Posts

Showing posts from April, 2013

c# - how to use subsonic to read csv file -

I should convert a CSV file to a good report for the owners. First of all, I did not think of programming at all. As a power user of both Excel and Word, I thought I could not work with it at any time, even without any stupid MS macro ... It was discovered that I was wrong. So I have to do some program to work. And it should be in C # Because I'm a big fan of non-invention-here and other database-to-object approach, I once used to work with Rack / Ruby / Roar / Active_Record, And at the time of returning to C #, I get subsonic classes to get simple jobs easily and later change things easily. Especially its simple design design is very good. It was almost half a year ago. Now I have this simple question, I can not find anything related to CSV in the subsonic site, but the subsonic website asks you to ask the stack overflow instead, here we are: Can I use SubSonic to read data in CSV file? (Unlike a regular sqlite or mysql database) subsonic is an ORM, not Ther...

c++ - How to make boost::thread_group execute a fixed number of parallel threads -

This is the code to create a thread_group and execute all the threads in parallel: boost :: thread group group; For (Int i = 0; I This code will execute all the threads at once. What I want to do, is to execute them all, but in parallel maximum 4 When it ends, no one else is executed unless it is done otherwise to execute it. Once the more efficient solution is finished, the primary thread will have to callback each thread, and the primary thread The handler can launch new thread every time. This stops repeating calls from time to time, because the primary thread will not do anything until the callback triggers.

lucene - i need to implement solr schema with frequently updated field -

I am using Lucene / Solr for search and navigation in file upload application. Every document has to be updated for each download. In the same case, digg.com was happy with how many "Diggs" they have for each link, while U I'm new to erasing / putting each Documents for download or something better? According to this, you can not partially update any documents: To update a document, the operation in Lucene is actually removed after one addition, you must add the entire document because there is no such "Update Only One Field" is not Semantic in Lausanne. If you want to update a field, then you have to add the entire document.

Possible to redefine the SessionID in a ColdFusion session? -

I am trying to redefine the session ID of a ColdFusion session, is it possible? Some time ago I closed my own session ID (session code and closed CFAPPLICATION and manually set code> cfid and CFTOK in cookies) 99% worked like time, but it was not good enough). You can read the details of doing this on Adobe's website :. Instead, if you are doing this to create a more secure session ID, then you is better than turning on UUID for the CFTCEN conventional session ID in CF Administrator Comparing / calculating estimate session ID is comparatively longer and harder.

osx - $PATH variable not properly set in gvim/MacVim when it is opened from the finder -

I am using MacVM (originally GVM for Mac). My $ PATH variable will be set correctly if I open MacWimme from the command line. If I open the Macwimme through the point and click with the Finder, then the $ PATH variable will not be set correctly. Can someone give me some insights? Note: I know that the least part of my path is set in ~ / .bashrc , but I do not know where this rest is set. Example: If I open MacVM from the terminal: % gvim basic.tex and then I go to MacVM: : $ $ PATH / opt / local / bin: / opt / local / sbin: / sw / bin Resize: / sw / sbin: /Applications/MacVim.app/Contents/M Acos: / bin: / sbin: / usr / bin: / usr / sbin: / usr / local / bin: / usr / texbin: / Usr / x11r6 / bin this is the correct path When I open the file with the mouse (in the Finder) :; $ PATH / uscho / bin: / bin: / usr / sbin: / sbin Why does this give me a little bit? I had this same issue, but it only appears after setting my default shell to zsh ...

InvalidUserName in asp.net CreateUser when creating a user with . character before the @ character -

I looked at the MSDN documentation and says invalidUserName is thrown when it does not find the user name in the database, which Okay because I'm creating a user should not exist in the database. If I use test@example.com, it works, but if I try with a test. @ Example.com, the status of the membership .reiteUser is the invalid user name. E-mail addresses come in the form username @ domain where the domain has at least two parts duration / Dot apart The RFC specification says that a. The (part of @ before) is valid in the username of the address as long as the first or last character (username) is, so the behavior you are seeing is correct. Looks like @ David Stratton: From your comment in Wikipedia link. .. Character (dot, period, full stop) provided that it is not the first or last character, and it is also provided that it does not show continuously over two or more times (E.g. John .. do @ example.com).

clojure - Type hinting not enforced in defrecord constructors -

I have created a type using the defrecord with type signals for the field, however Found that these types of signals are not implemented in constructors and I am capable of doing some strange things with them. For example, see Snippet below: User = & gt; (Defrecord person [# # string name # ^ integer age]) user. User user = & gt; (Seq (.getConstructors person)) (# & lt; Constructor public user.Parson (java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object) & gt; # & lt; Constructor public user .Person (java.lang.Object, java.lang.Object) & gt;) User = & gt; (Individual (integer 123) "Innovation") #: user.Person {: 123 Name: Age "Innovation"} The manufacturers shown are not provided with signature type signals ( They use both string and integer for objects ) and I am able to create an object with incorrect field types. Is there anything wrong with my code or is it a bug in the closure? I am on Closer 1....

SSL/TLS/HTTPS sites are very slow in a C#/.NET WebBrowser control, but fine in Internet Explorer -

I manually login to a C # application via webbrowser control, and then save the stored cookies for the use of HttpWebRequest. The problem The problem I have is that it takes an incredibly long time to load any site that uses SSL / TLS (https: // urls) It is often time consuming, I have tried it not only with the mediawiki site but also with other secure sites like PayPal and secure Gmail. By curiosity I tried the help of Visual Studio in the same https sites in the browser, [VB Webbrozer Sample] [2], and [WPF Webbrozer Control Sample] [3] and they were all slow, they were the same The sites work fine on Internet Explorer 7 (and of course Firefox). Question What is the reason for the SSL / TLS sites (HTML URL) .NET WebBrowser controls, but loading in Internet Explorer properly? , while coding our chat app, and web services, that was HTTP, SSL type It will take a lot of time to resolve the request. In fact, when we were writing our site checker (which ensures all...

validation - Rails 2 Trailing Route Parameter -

I am creating an article / blog website where any article can be shown in a series of URL paths. . / section / article / section / page / article / section / page / page2 / article this works, but what if I Want page number / section / article / page / 123 / / section / page / article / page / 123 / section / page / page2 / article / page / 123 Will it mean that I have to make a specific route for every different url? /: section /: page /: subpage This will mean that I'll create dozens of URL routing parameters. Is it anyway to say that the URL has a one / page / NUMBER suffix at the end of the URL, and still the routine normally (which assigns NUMBER to a parameter and normally Going to page)? root globing, which is described on, can work in this situation. For example, your route map.connect '/: section / * page_subpage_path / page /: number',: admin = & gt; Can read. 'Articles',: Action => 'Show' This correct code pr...

c# - MVVM and DI - How to handle Model objects? -

"itemprop =" text "> I am using Caliburn and C # but I think this is a normal MVVM / DI question. Let's say that I do a visual model, NoteViewModel, that a model object named Note is passed Here are some code: class NoteViewModel: PropertyChangedBase {Private note-only note _ note; Public note-visual model (note note) {_note = note; } Public string title {get {return_note.Title; } Set {_note.Title = value; NotifyOfPropertyChange ((=) => header); Now this object is created by passing new () and a model object. Well, it works fine, but now I have to add a method that requires an imported class from my DI container. Do I call the service agent only. Currently to get it? Or should I design this visual model to prepare it through a de detector and in some way should a way to pass a note object? What is the correct way to design this visual model? Basically for a "PerInstance" visual model it requires a model object to use it. Caliburn i...

smtpclient - Why ftp credentials are stripped away from email body when using MailMessage in C#? -

I am sending emails to customers, informing them for specific content delivery and I have a mail body containing FTP There is a problem with Yuri. I am creating FTP Yuri with FTP credentials in the following format, but the share of credentials has been stripped (section user: pass @): The code is something like this. That: mail-template + = string.format ("& lt; a href = \" {0} \ "& gt; File FTP URI: {1} & lt; / a & Gt; & lt; br & gt; ", new URI (FTPBLink, filename), file name); And the email is sent with the following: MailMessage Message = New MailMessage (mailSettings.Smtp.From, mailTo, subject, mailMessage) {IsBodyHtml = true}; SmtpClient Client = New SmtpClient (); Client.Send (message); Is there a clue how can I override this "generalization"? I thinks is that a general "criterion" Was refunded some time back because the people passing through the URL containing the URLs were being used in...

ruby on rails - What exactly is a web framework? -

There is a web framework, like Django and Ruby on Railing, which is a way of displaying code that can be written to http normally is ? Or is it used for more server-side things, such as data collection is used as front-end or back-end for websites? Let's talk for a moment, things that are not web frameworks. At the most basic level of the web you have a webpage, it is usually a mute page with some text on it, perhaps an embedded video or some images. This does not take care of (or at least ideally), where it shows that the luggage is coming. You do not need any scripts, databases, etc. for a stable webpage. Common tool used: HTML, CSS, Javascript Then you have to say Content Management System (CMS) such as WordPress, they add a little more functionality to your site, but what they actually do is to manage your collection of webpages. To provide a way - make people on the fly. Etc. You can use them and they can communicate with CMS through administration. They provide t...

xcode - How do I run my iPhone app on the iPad simulator -

I recently updated to the new version of the encoded. It is a big mistake that I have been having constant problems since then. How do I play an iPhone app in the iPad simulator? The option to do this has disappeared! I had an option to run on an iPhone or iPad device or simulator, now I can select the simulator or device and there is no option for the iPad You can change the device type in the simulator from the hardware menu.

wcf - The definition of the report 'Main Report' is invalid -

I am installing a service on a machine that will call a method from another WCF service and a rdlc report Will email. I have a copied report in the compile directory and I refer to it, it seems that is to find it local report report = new local report (); Report.ReportPath = @ "C: \ Services \ Experience Field Manager \ ExperienceService \ bin \ Debug \ DailyLog.rdlc"; I have nothing named 'Main Report' in my code, any suggestions? Thanks a lot in advance. Solution: Place the required Microsoft.ReportViewer.ProcessingObjectModel installation folder in the bin / debug directory.

c# - How do I convert System__ComObject to an image? -

I am using DSOFile to obtain summary properties from some crystal report report files. Summary Properties The thumbnail returns an object and I have to convert the object to an image so that I can display it as a preview on my form. I tried to put it in a system.Drawing.Image but I get an error "Can not convert from image converter system. Com com object." This will probably be a COM interface for images You can use the AxHost.GetPictureFromIPicture or GetPictureFromIPictureDisp static method to create the conversion.

c# - Custom Silverlight cursor -

How do I create a custom cursor in silver light? Is there any other way than showing a hidden canvas? Is there a custom cursor image? Is there a professional way to do this? Here's an indicator

wpf - Unload event when changing font size in Windows XP -

Image
क्या हम Windows XP में डिफ़ॉल्ट फ़ॉन्ट आकार को बदलते समय अनलोड, ऑनपॉइंटटैम्प्लेट और ऑन-टेम्पलेट को रोकने के लिए संभव है? यह हमें कुछ समस्याएं पैदा कर रहा है और हमें इसे संभालने का कोई अच्छा तरीका नहीं है। अगर आप जानते हैं कि इस स्थिति में अन्य घटनाएं किस तरह से शुरू हो जाती हैं, तो इससे हमें बहुत मदद मिलेगी। धन्यवाद! संक्षिप्त जवाब नहीं है। विषय-आधारित गुणों में से कई WPF में डायनामिक संसाधनों के रूप में स्थापित किए गए हैं, जिसका अर्थ है कि टेम्पलेट फिर से लागू होते हैं, ताकि वे WPF ऐप्स अच्छी तरह व्यवहार करें जब उन थीम-आधारित संसाधन संशोधित हों। शायद आप जब उपयोगकर्ता थीम-आधारित गुणधर्म बदलता है तो क्या टूट रहा है, उसके लिए विशिष्ट समाधान की तलाश में आपका प्रश्न पुनः पोस्ट करना चाहिए।

optimization - What compilers can detect pure mathematical functions and optimize them (without telling you so)? -

I have seen it. Is the compiler able to detect pure mathematical operations and optimize them (without informing you so)? To do this is naturally risky in languages ​​which are lacking indicators and global compilation ; Analysis. Therefore, if any one operation has been declared non-present, then the compiler should admit that it may have side effects. Example: // getx.cpp int GetX Int input) {int * pData = (int *) Input; * Pidata = 50; Return 0; } // gety.cpp int GetY (int input) {Getx (Input + 4); } // main.cpp int main () {int arg [] {0, 4}; Return GetY (int) arg); } When compiling the compiler Getty , it can not say that GetX considers its argument as an indicator and dereferences And modifies data Non-functional, side-effect-prone methods This information is available only during linking so that the concept of link to include many code creation and analysis to support you Have to search again.

ANTLR, C-styled macro definitions -

What is the easiest (or best) way to implement macro definition in ANTLR? I have a system similar to the one currently present in the C / C ++ language: #Define FUNCTION (a, b) a + b #define PI 3.1415 How and when do I replace? If you are doing a pre-processor in the style of C, then you have a pre-processing Want to pass the separate first pass (which means that - pass before processing your standard lex / parse pass) How exactly is it up to you to pass - you can pass your input text to the entry in a gramer, take the result and hand to another grammar, etc. Or you can create separate programs that are able to input stdin and output to stdout , or pass text between pipes, etc. Once you've worked, check the simple case for each token of searching your keywords that you see against your table of #define s, and If it matches, replace it with the definition you define. You need to be able to parse the function parameters, but you should not try more than this....

tdd - Unit testing when developing a website? -

After learning about TDD and Unit Testing, I'm actually looking to write code when I prioritize the code because I see profit coding in Python I am developing a website, and according to the requirements I am trying to write a test, but it is proving more difficult than expected. When you are building a library, then I can see the benefits of writing. Code to develop a website with a public interface to use others where there really is no logic , And most of the database seems to be a little harder in reading and writing unit exams. Mostly, I need to create / edit / delete rows in the database. I am using the framework (3 Kohana for PHP), so 99% of all libraries and assistants who are being used are already being tested (hopefully) What is there to write the test for them? I'm talking about scripting mostly languages, not about CSS or HTML, I already know about cross-browser testing. EDIT: Is this a sign of lack of activity? I understand that some things should be tes...

django - Empty catalog when internationalizing JavaScript code -

I'm trying to set up. In my Django app there is a subdirectory with a locale a properly generated djangojs.po file. The package definition is as follows: # urls.py js_info_dict = {'package': ('my_project',),} ./manage.pyMakmessus works well because the .po file contains all-translated strings, but no javascript string is ever translated on the website. And the catalog is always empty. I had some problems with it too. How it works for me: Add it to the URR root urls.py: js_info_dict = {'domain': 'djangojs', 'packages': ( 'YOUR_PROJECT_NAME',),} urlpatterns = Pattern ('', # JavaScript is enabled using the translation string in #source: https://docs.djangoproject.com/en/dev/topics/i18n/translation/#module- Django.views .i18n (r '^ jsi18n / $', 'django.views.i18n.javascriptcomatalog', js_info_dict),) Use in JS files: var somevar = gettext ('text to translate'); To comp...

sql - is it common practice to further manipulate query results in code -

I do not have much experience with programming or scripting database queries, and I think rely on manipulation of results Instead of writing a final query, spending time with a database, to achieve my ultimate purpose. In some cases in fact I am completely changing the nature of the result by adding values ​​of columns and by removing the rows. Instead of writing more complex questions, it seems easy to manipulate the code. Of course, for most of the time I can write a query and I'm getting back to the result with the server how I want it to be consumed but there are occasions where I run the results for further filtering Yes, because I do not know how to do this in SQL, but coding is quite straight forward. Post-text "itemprop =" text "> Depending on it, generally, you should give a database to the database that are good in the data database - to be included in filtering, sorting, and data For complex complicated post-Qualification changes of data (bus...

php - It wont set the session? -

I have this PHP login system, I was working on it on a local host, I bought a webhost hotel and now this work Now does not, and I do not know where this is wrong. I did not get any errors. The login page is in index.php, and when you sign in, and everything is fine (no errors / wrong PWs etc.), then you should get home. Will be redirected to. This is not the case. When I log in, it refreshes index.php again and outputs it at the top: Warning: header information can not be modified - headers already (httpd .www / oBz / index.php: 2) There is httpd.www / oBz / index.php on line 221: Title ("Location: home .php "); Okay, so I went home to enter the Php manually, now at home.php I am at the top: Include 'dbc.php' ; Page_protect (); Echo "Hello World"; page_protect Check if a session is set or cookie (I remember), but if something is set then you will be content "hello world" and you will not be used. But right now I get this b...

php - Why are warning messages generated about duplicate IDs when there are none? -

The following is an unexpected warning message that the server is giving me: Warning: DOMDocument :: Load HTML () [domdocument.loadhtml]: ID Page 3 is already defined in the unit, Line: 25C in: \ Program Files \ Zend \ Apache 2 \ htdocs \ joom \ templates \ valueTemplate \ updateRecord.php Row At 74 . The above warning message is generated on the execution of the following code: $ html = new DOMDocument (); $ HTML- & gt; Load HTML ($ Factaid ['Content']); . The message is unpredictable because there is no duplicate usage of 'page3' in the HTML document as an id. I 'Page 3', however, the HTML document is used as the value of the name attribute multiple times is. For example: & lt; Li id = "index00025" name = "page3" class = "fooBar" & gt; & Lt; / Li & gt; . Any help on this will be fully appreciated. thank you in advanced. This is expected behavior in HTML, the attribute "name...

c# - WCF Full Duplex Handle Client Disconnection -

Do I have a way to detect customer disconnection from my service? I get the chance to find out that a fixed client is disconnected on the attempt-grip method, which is not a very good way to do this. I do not want to create a timer for every new customer who joins my service, just to monitor your final transaction. No, there is no simple or elegant way to detect customer disconnection. It would be a good environment, if the client stopped or crashed, the service found the "client turbinated" event. However, this behavior is not only fit with message-based architecture. A great solution is to ping the client to callback method, and see if this call time is out or not. Alternatively, if you are using instancing per session, you can set the inactivity timeout to a small value (i.e., as opposed to the default 10, one minute), and Empty method on a server on client side from time to time. See for a similar discussion.

cocoa - How to get transparent image from OpenGL ES context on iPhone -

I have a problem with the OpenGL ES on iPhone. I am working on a project, it draws something on the scene, and then saves the image. It also has a background image. I saw the image and added it to the background image. I did not set the opaque property of the scene, but the image still comes from opaque view. So I could not combine both images together. I could only see the front image, the background image was not found anywhere. CAAgeLLair * EAGL-Layer = (CAAgeLLair *) self Layers; EAGLLayer.opaque = No; Get the image code like this: - (UIImage *) GetImage {CGFloat Width = self.frame.size.width; CGFloat height = self.frame.size.height; GLUBEET * TMPFire = (GLUBEET) * Molec (width * height * 4); GlReadPixels (0, 0, width, height, GL_RGBA, GL_ UNSIGNED_BYTE, TMPBuffer); GLubyte * Buffer = (GLUBE *) Molec (width * height * 4); {Buffer ((Ansaitijir) height - 1 - y) * (Ansaiattegr) width * 4 + for (Int y = 0; Y & lt; height; y ++) to {(Int x = 0; x and LT ; Width * 4;...

C# application GUI breaking on different Windows icon/text size settings -

I have an AC2 form application that has fixed size (it can not be resized ) And can not be maximized. Users who have different settings for their icon / text size, they break my GUI (full form is big, background images start at tether time, etc.) Help? You need permission to scale your form and control, the user may have changed their DPI setting for some reason Probably relates to accessibility and, as developers, we should try to follow the user interface and accessibility standards. This is usually done by web sites and applications Ensure the quantity of work to make an asset for sale. To ensure the positioning of the control, make sure that the best way to ensure that they are tampered with or shaken by the side of the scaled form is that your application Compliance is to test both the ends of the spectrum and on general recommended settings. To disable the maximum of the form, it should only be done when you make sure that this form fits on the smallest display...

c# - read full xml file data over tcp -

I'm developing an application that either the incoming data on the PC and then when I'm trying does it decodes the data to use the software with any sniffing have been stored in the dB and I can read it myself ... but my code .... this came in a format like 1651589240214931398151442251437622947132917620011138147205162160411201699123179148781675713921035101183865895219106213196222741589715384652061681391901278671232822552717812424975221242 11517622131122113236255230254211206911242051832545515823012124925217318223920523316923122925514321122343602492471242 ........ I have tried to use this System.Text.Encoding.ASCII.GetString (tcpHeader.Data) and it is working fine. But when I run it and wait for data (this is in XML format) I have found in many packages that it is difficult to read it again ... What should I do? Do I have to collect data from every packet, then add all to get the whole message? Or there is a library to do that in .net

How to generate external logfile in android app? -

Do I know there is any way to generate an external log file? This can be done for example with Java.util.logging classes: import android.os.Environment; Import android.util.log; Import java.util.logging.FileHandler; Import java.util.logging.Level; Import java.util.logging.LogRecord; Import java.util.logging.SimpleFormatter; File handler fh = faucet; String name; If (0 == Environmental Gatestylestoristestat ()) Compare (environment. MIDAImautage) name = Environment. GatexAnationalized Directory (). GetAbsolutePath (); Other Name = Environment GateData Directory () GetAbsolutePath (); Name + = "/mylogfile.log"; {FH = try new file handler (name, 256 * 1024, 1, true); Fh.setFormatter (new SimpleFormatter ()); Fh.publish (new log record (level, tag + ":" + msg)); } Hold (exception e) {Log.e ("MyLog", "FileHandler Exception", e); Return; } Finally {if (fh! = Null) fh.close (); }

c# - ComboBox that shows all removable devices -

मेरे पास एक कॉम्बोबॉक्स है (आइटम्ससाइट्स = "{बाध्यकारी पथ = उपलब्ध ड्रिव्स}")। उपलब्ध ड्रिव्स संपत्ति को इस तरह परिभाषित किया गया है: सार्वजनिक सूची & lt; DriveInfo & gt; उपलब्ध (ड्राइव) प्राप्त करें (DriveInfo.GetDrives ()। जहां (x = & gt; x.DriveType == DriveType.Removable) .सूचीसूची (); }} यह ठीक काम करता है, लेकिन मुझे लगता है कि अगर मैं यूएसबी डिवाइस को प्लग / इन / प्लग करता / करती हूं तो कॉम्बो बॉक्स को खिड़की को बंद करने और फिर से खोलने के बिना पुन: स्थापित किया जाता है। मैं इसे कैसे प्राप्त कर सकता हूं? thanx # सरल तरीका होगा अपने फॉर्म पर एक टाइमर डालने के लिए और ड्राइव के लिए क्वेरी जब उसकी घटना आग लगती है। फिर कॉम्बो बॉक्स को नए मानों के साथ अपडेट करें।

Why is this Sql Server CAST(..) rounding a Decimal to a VarChar? -

I'm trying to change some decimals to varchar , But they are getting rounded . Can anyone tell me why? declared @UpperLeftLatitude decimal, @UpperLeftLongitude decimal, @BottomRightLatitude decimal, @BottomRightLongitude decimal set @UpperLeftLatitude = 38.663 set @upperLeftLongitude = -122.857 set @BottomRightLatitude = 37.795 set @BottomRightLongitude = -121 .219 Declaration @SearchRectangleStringVARCHAR (Max); Set @SearchRectangleString = 'Polygon (VARCHAR (50), @UpperLeftLatitude) +' + Cast (@UpperLeftLongitude as VARCHAR (50) +) ',' + Cast (@BottomRightLatitude as VARCHAR (set) 50)) + '' + (+) as 'UpwardLeftLongitude VARCHAR +', '+' Cast (@ VARCHAR (50)) as 'BottomRightLatitude +' (@BottomRightLongitude as VARCHAR) Varchar (50) as Cast ++, '+ Cast (@ UpperLeftLatitude) +' 'Cast + (@BottomRightLongitude as VARCHAR) (+ 50) +', '+ Cast (@UpperLeftLatitude) )) + '' + Cast (@UpperLeftLongitude...

javascript - How to invert the forecolor and backcolor when any one of them changes -

I am using a Ajaxtotee to choose a color. If selected as a black color, its related foreclosure should be set white and vice versa. I want to do this with javascript & lt; Script type = "text / javascript" & gt; Change function color (sender) {// sender.get_element (). Style.color = // "#" + sender.get_sainted color (); Sender.get_element () Value = "#" + sender .get_selectedColor (); } & Lt; / Script & gt; The back color is being set by AJAX Javascript. sender.get_selectedColor (); What color can be set using . How to reverse this color I think it is possible using regex , but do not know how to do it. You need to get every color complex from RRGGB, return it back and then return the glue: function number ohex (nValue, nLength / * = 2 * /) {var sValue = Math.abs (. Math.floor (nValue)) toString (16); If (! NLength) nLength = 2; If (sValue.length & lt; nLength) sValue = Array (nLength + 1 - sValue.length). Joint ...

sql server - x86 and Vista 32 bit compatability -

Can I run the x86 version of the Microsoft® SQL Server® 2008 Management Studio Express on the Windows Vista 32-bit version? x86 is 32 bit, so there should be no problem! X64 is a 64-bit version. You can run 32-bit applications on 64-bit (x64) machines, but not 64-bit applications on 32-bit (x86) machines.

asp.net mvc - Cookies, updating the expiration date on each request in mvc -

I have a fairly simple web app that cookies to store some information about the user and authorize them on each request. uses it. When a user first logs in to the site, a cookie is created and some encrypted information is stored in it, the expiration date is set for the current 24 hours. What I want to achieve is that when the user is moving through a web app, their expiration date is being extended to 24 hours from the present time. What is the best way to do this? Am I using an attribute on the controller? You can write a custom action filter which will be executed first, each action reads the cookie from this filter request And sets a new cookie with the same name and value, but with a new expiry date.

sql - FULL OUTER JOIN or UNION? -

How can it be confused or confused with the whole union? I want to be involved in the results like this: Table 1 Table 2 --------------- ---------- --- ---- ID name salary ID return --------------------------------- 1 John 1000 1 Sepals 1 Henry 4000 1 mango 1 smith 1000 1 tomato should be the result ResultTable ---------------- --- ----- ID name pay fruit ----------------------- 1 John 1000 sepals 1 John 1000 mangoes 1 John 1000 tomato 1 Henry 4000 Sepels 1 Henry 4000 megons 1 Henry 4000 tomato 1 Smith 1000 Sepels 1 Smith 1000 mangoes 1 Smith 1000 Tomatoes You need to join a cartesian product or cross-joint. SELECT * to Table 1, Table 2 or SELECT * (context :)

algorithm - Multiway tree construction from a node string -

Image
There is a wonderful problem called ninety-nine, the problem is specified in the P70 header. And here is a great promotion of this problem which only takes 5 lines. However, my understanding of prologue is limited. How does this solution appear in a C-like form (no Iitirolls available)? Edit by request I hope I do not violate copyright. Problem: Syntax in BNF: tree: = letter one '^' forest:: = | Tree forest A good solution using inter alia: tree (ts, t): - atom (ts), !, atom_chairs ( TS, TL), tree_d (TL- [], T). % (+,?) Tree (ts, t): - nonveir (t), tree_d (tl- [], t), atom_church (ts, tl). % (?, +) Tree_d ([x | f1] -t, t (x, f)): - one_d (f1 - ['^' | t], f) one_d (ff, [] ) One_D (F1-F3, [TF]): - Tree_D (F1-F2, T), One_D (F2-F3, F). problem definition (taken from) We believe that the node of the multivace tree has a single character. In the sequence sequence before the depth of your nodes, whenever a particular character is ^ during the...

oracle10g - ORACLE APEX and UTL_FILE - creating a file on the server where database is installed -

I'm not sure what I'm trying to do. I'm calling a process from any app (or SQL Workshop) app. This process should be written to the server using UTl_FILE. However, this does not work. I have not received any errors, all relevant messages are displayed and updated. However, the output file is not created when I work from this SQL prompt on this server, it works! Since the APEX server resides in the database, I have thought that I can call a process to write on the server. I have completed all necessary things like making a directory and giving necessary personal provisions. I also tried to use the wrong directory name and I got the error which I expected so that the directory can be accepted. I am running Oracle 10G version 10.2.0.3.0 and Apax version 3.2.0.00.27. Oracle Radahat is running on Linux. All the appropriate items are in my schema Is it possible or do I need to find another way to do this? I have given APEX_PUBLIC_USER the READ and WRITE privileges on the dire...

tokenizing a string in C -

Hello I want to make a string to a token in C The following string is. I want to token to {and} to give me "job start", "job running" and "Job is over" I also want to use the same delimiter as the characters to run away {started the job} {work {ID1}} is going on {Work {ID2}}} {Job Finished} I should start the job job, {id1} running, job (id2) running Is the job It went to be received. I have the solution Pointer Air-Metmatic, but do not want it to iterate over the input string more than once. Any suggestions. You can use a simple finite state machine: #include & lt; Stdio.h & gt; Int main () {char * src = "{initial}} {job} \ {ID1 \\} running} {job} \ {id2 \\} running} {job expired}"; Four tokens [100] = {}, * dst = tokens, ch; Int State = 0; Switch case (case:) (case =}} ==} {switch (state) {case 0: if (ch == '{'} state = 1; breakage; case 1: switch (ca) {case '}' : Printf ("token:% s \ n...

c# - Use Linq and lambda to flatten a list -

मेरे पास एक वर्ग है। पब्लिक क्लास मेडिकल रिक्वेस्ट {निजी इंट आईडी निजी आईआईएलआईटी & lt; मेडिकलडिज़ एंड जीटी ; दिन निजी स्ट्रिंग MedicalUser ...} और अन्य सार्वजनिक कक्षा MedicalDays {निजी आईआईटी; निजी समयसीमा? दिन निजी मेडिकल अनुरोध अनुरोध ...} मेरे पास मेडिकल यूज़र है इसलिए मैं IList & lt; MedicalRequest & gt; ReqList = dao.FindAll (उदाहरण); इस बिंदु पर मैं क्या करने में सक्षम होना चाहता हूँ, मेडिकल दिवस की सूचियों को समतल कर देता है और दिनांक का समय वापस आ जाता है। कुछ ऐसा आईआईएलआईटी & lt; दिनांकटाइम & gt; DateList = reqList.SelectMany (i = & gt; i.MedicalDays.day); क्या कोई मुझे सही दिशा में एक धक्का दे सकता है? आपके समय के लिए धन्यवाद आप लगभग वहां हैं: IEnumerable & lt; DateTime? & Gt ; DateList = reqList.SelectMany (i = & gt; i.MedicalDays)। चुनें (एम = & gt; m.day); या: IEnumerable & lt; दिनांकटाइम? & Gt; DateList = reqList.SelectMany (i = & gt; i.MedicalDays, (i, एम) = & gt; m.da...

asp.net - requireSSL="true" for subfolder -

Is it possible to determine the requirement of SSL = "true" for the admin part of the site alone? You can do this easily for any page: HttpContext.Current.Request.IsSecureConnection.Equals (false) then react. Redirection ("https: //" + request. White ("HTTP_HOST") + HttpContext.Current.Request.RawUrl) End if

Readonly collection properties that NHibernate can work with -

There are such collections in my domain classes that look like this: Lt; Foo & gt; _foos = new list & lt; Foo & gt; (); Public Virtual Readline Collection & lt; Foo & gt; Foos {Back {Return _foos.AsReadOnly (); }} This gives me a read-only archive that can be modified from within the class (i.e. using field _foos). This archive is mapped as follows (Fluent NHibernate): is similar (x = & gt; x.foos) .Key column ("Parent Class ID") . Cascade all (). Inverted (). Access.CamelCaseField (Prefix.Underscore); Now when I try to use this collection, I get: Object type 'NHibernate.collection.Generic.PersistentGenericBag 1 [Foo] 'Type' System.Collections.Generic.List to type '[Foo]'. According to , this is because NHibernate should be exposed as an interface in order to inject NHibernate one of its own collection sections. The article suggests using ILIIS instead, but the regret is that in this interface the AsReadOnly ...

google app engine - Creating superuser in django-nonrel -

I am a newbie who is going through the degeno-non-native tutorials and establishing of Diego-Niel within Google App Engine Is of I am now trying to make a superuser: manage.py createsuperuser --username = joe --email = joe@example.com I Unknown command: 'createsuperuser' Use 'manage.py help' to use I do not see if I type manage.py help Lets createruperuser listed. Help. This solved. To make the same task work for the admin, for anyone else: 1) Make sure django.contrib.auth settings_apps section in your settings 2) Turn off the runner, then using manage.py createsuperuser . You have made a superuser, start the runner again.

android service running in the background -

I would like to do a service that runs in the background and monitors quality. I have thought of a different service that exposes the ADL interface for an activity, the ADL will have some monitor related functions that can make an activity call. To illustrate how my service should work, think about the background Abduction app and are waiting for incoming calls (I believe this is done by a service) Is this a correct way of my problem? I am currently able to build my service and use the ADL interface, but when I stop the activity (when I return the button) the service is also destroyed! How to avoid this? I would like to make a continuous notification like ebudi, how to do it? I have tried with the Notification Manager, but there is no luck, I have just added to the Notification section. OK, all you have to do is make a notification mNotification = new notification (icon, text, when); MNotification.flags | = Notice FLAG_ONGOING_EVENT; and notify using the Notifica...

python - fuse utimensat problem -

I am developing fuse FS (with fuses-time bindings) on Python. Which method do I need to implement for working touch ? Currently I have the next output: $ touch m / my \ files / d3elete1.me touch: `m / files / d3elete1.me 'setting time: invalid argument File exists "d3elete1.me": $ ls -lm / my files / d3elete1.me -rw-rw-rw-1 root root 0 July 28 15:28 m / My files / d3elete1.me In addition, I was trying to find system calls: $ Strace touch m / my \ files / D3elete1.me ... open ("m / my files / d3elete1.me", O_WRONLY | O_CREAT | O_NOCTTY | O_NONBLOCK | O_LARGEFILE, 0666) = 3 duplicates (3, 0) = 0 off (3) = 0 utility (0, shoe New, zero, 0) = -1 inward (invalid argument) closed (0) = 0 ... As you are seeing utimensat failed . I was trying to implement empty utimens and utime but it has not been called too. Try launching the fuses with the -f option. The fuse will remain in the foreground and you can see the errors in the console. ...

Good Javascript material for beginners with tutorials Please? -

संभव डुप्लिकेट: ट्यूटोरियल अच्छा शुरुआती के लिए जावास्क्रिप्ट सामग्री मैं इस ट्यूटोरियल की अनुशंसा करता हूं:

How to Decode ASN.1 format to CSV format using Unix Programing -

I have an ASN format file, it is also readable in CSV format I need a decoder Some advanced options such as schedules, auto ftp such as very old thread but it still comes to the top Good to get Google search and answers for people There is absolutely no UNIX programming but you can see the "Generic" Javascript based ASN decoder. You can also download it and run it basically on your box.

mysql right join with group by problem -

मेरे पास 2 टेबल हैं: लैंडिंग पेज - प्रति अभियान लैंडिंग पृष्ठ होते हैं। रिपोर्ट - प्रति लैंडिंग प्रति हिट और रूपांतरण पृष्ठ। मैं क्वेरी करने का प्रयास करता हूं जो प्रति लैंडिंग पृष्ठ पर हिट और रूपांतरण की राशि लाता है, लेकिन मुझे यह चाहिए कि यदि लैंडिंग पृष्ठ है कोई भी हिट और रूपांतरण प्राप्त नहीं हुआ ( और रिपोर्ट तालिका में नहीं दिखाया गया ) तो मैं चाहता हूं कि वापसी 0 परिणामस्वरूप। अब तक मैं क्या करूँ : SELECT l.LandingPageId, SUM (हिट्स) हिट के रूप में, SUM (PixelSum) के रूप में रूपांतरण c रूपांतरण रिपोर्ट से सीधे लैंडिंग पेज्स पर (सी। लैंडिंग पृष्ठ आईडी = एल। लैंडिंग पृष्ठ आईडी) जहां सी। = एक्स और दिनडेट & gt; 'Y' ग्रुप द्वारा c.LandingPageId समस्या यह है कि मुझे रिपोर्टिंग तालिका में मौजूद लैंडिंग पृष्ठ के साथ केवल पंक्तियाँ मिलें और 'y' को पास करें, (उदाहरण: मुझे लैंडिंग पेज की केवल 2 पंक्तियाँ मिलती हैं, लेकिन 4 लैंडिंग पेज हैं अगर मैं इस क्वेरी को चलाता हूं तो मुझे 4 परिणाम मिलते हैं SELECT l.LandingPageId FROM लैंडि...

java - Need Help Reading Data From Inputstream -

I have a robot and a GUI application is running on the GUI. Sending data to GUI. Before I send a value, I first send a value that the GUI will use to determine the constant values, for example afterwards I send something like this; dataout.writing (2); Dataout.writeInt (50); Dataout.writeInt (506); Dataout.writeInt (50); Dataout.flush here reads GUI 2 and then under 2, it will read the next two integers. The GUI has come to me on the side while the loop is one thread which is constantly reading from the inputstream. I have a switch case statement inside the loop at the GUI. Example while (true) {int val = dataIn.readIn () switch (val) {case 1: int color = readInt (); break; Case 2: int me = readInt (); Int You = readInt (); break; Case 3: int megg = readInt (); Int youss = readInt (); Int mes = readInt (); Int youe = readInt (); break; }} T is not working as I want, this is what I get: After this I have read the intro for the first time, Series which is reading ...

scala - Lift Req object -

In Liftbook, there is an example of creating a rake example using Apply: Case Rick ( List ("API", "Expenditure", EID), "", GetRequest) => () => show expense (EID) But when I look at the API documentation, two applications ( ), But I do not know which else in this example and how to run away. In addition, there is a way in which / a / b and / a / b / c are included with a Do ? In addition, there is a method, how to calculate all possible requests in a case : estimate: case (list ("API", " case , this is not an example of creating a rick , but an example of this one. In addition, there is a method, how to calculate all possible requests in a case Case Rick (List ("API", "Spend", EID), "", _)

asp.net mvc - How to resolve an user repository using Windsor IoC at the start of the application? -

I get an error message "Object reference is not set to an object instance." When I try to use a UserRepos repository, the question is how can I fix the user repository at the beginning of the application (ASP.NET MVC) What's wrong here? Public Class My Unification: HTTP Application {Public IUserRepository UserRepos; Public IWindsorContainer Container; Protected Zero application_Start () {Container = New Windsor Container (); // Application Services Container & Lt; iUserRepository & gt; (); Applicable; & lt; UserRepository & gt; ()); UserRepos = Container Resolve & lt; IUserRepository & gt; (); } Private Zero On Authentication (Object Sender, Event Argus E) {If (user! = Null) (if user.notification.asauthenticated) {// here error "object reference is not set for an instance of an object . " Var user = user repose.get userbainname (context user.indenti .name); Var Principal = new MyPrincipal (user); Thread Custom Principal = Context. ...

Objective C equivalent to Java's ArrayList -

Just wondering if the purpose of Java serial is equal in C? Or something like that thanks store objects / data Can be used to As others have said, / what you are looking for Java is coming from the world, you feel that the collection offerings of cocoa seem quite low. In reality, the functionality is quite broad . In fact, the public API is a "abstract" class, which means that the NSArray , NSDictionary , and NSSet are actually. When you initialize one of the archives, in fact, a solid implementation is done for the data you provide. If this data changes (as it grows in size), then concrete implementation can also change when running this implementation, as compared to Java-static typing (and security), Objective-C has more dynamic run time due to this all possible is. Thus class cluster strategy hides many implementations, e.g. java.util.List interface behind a single API. Coca-Cola Frameworks are limited in compound data structures (i.e. set, set, and...

listview - Android: Tweetie Style List Refresh -

I came from an iPhone background and writing Android app. I've got a list cached locally, but the primary is stored on our webserver because the app is an interface for our service. I really want the user to have an easy way to refresh the list. That's why I am trying to replicate the Twei pulldown to refresh the list. Does anyone know how to hide the inventory header row, so Android believes that the top is the first list item, and it naturally stops scrolling there, but if If you drag the list down, then it shows the "Refresh" header which remains on the screen until it is refreshed and then goes back up? View this widget:

sql - Migrating content from legacy blogging platform to wordpress -

I am working on a huge site for a customer, but their current website (thousands of pages deep) on a legacy The blogging platform that was specially created for them in ASPX. My work is to take all the SQL tables filled with data (comments, categories, posts, titles, dates, etc.) and convert them into WordPress Ready format. I want to reformat those elements which I have in a format that can understand and process WordPress. The tables are not close to a match given to the WordPress format. I am looking at a major data migration and supporting tools, resources or people. I have a little experience with my SSL or database I am a web designer with Can anyone tell me here in good direction? With the help of tools you can migrate. It will boil for the best old-fashioned SQL. It seems that you are trying to do basic one, I will start reading it on how many tables are you treating here? I also recommend printing the unit relational model (database diagram) for new and old data...

r - Panel data: dealing with lagging and binary dependent variable with plm -

I am trying to run a logical regression submitted with panel data and a binary dependent variable Since I wanted to leave behind some variables, I used the PLM package to make them. When I tried to do it in other ways, I could not interrupt or embed the problem, because this is the panel data hybrids & lt; -pdata.frame (deductible, c) ("state", "year")) and I wanted to put everyone, but I did not know what I was doing. Before physics original figure frame (hybrid) I run pool analysis. I am pretty sure that I do not need it, but I I am a visual person, and want to verify the format of the data before running any analysis. From the output given below, it seems that everything is done correctly. head (intervals (hybrid accumulation $ ishing, 1)) Alamma - 1990 Allama-2000 Alamma-2001 Alamma-2002 Alamma-200 3 Alamma-2002 Head (Hybrid Accumulation $ Esapendending) Alamma -1999 Alamba-2000 Alamma-2001 Alamma -2002 Alamba -2003 Alamma-2002 58294...

Running c++ from Java problem -

I need to compile and run a c ++ program from Java. I am using Process A = Runtime.getRuntime () Executive ("G ++ G function.cpp -O Function") .; Process B = Runtime.getRuntime () Executive ("./function") ;. The problem is that the output I received from C ++ program is not correct, but if I compile and run it in my own command line it just works fine. The problem is Java and I do not know why. Thank you very much Al, And there is a potential problem that I see here. The problem is that if Runtime.ACAC ( not waits to complete the process), then you have to add a.waitFor (); Before calling, call b. The issue is that depending on how you are applying this application, there can not be a current working directory, where you think it is. Therefore function.cpp may not exist.

wpf - Binding to DateTime.Now. Update the value -

OK, I had to pair the date time.Now for a text block, I used it: text = "{binding source = {x}: static system: datetime.now}, stringformat = 'hh: mm: ss tt'}" Force to update? This is the time when the control is loaded and it is not updated ... Edit (I didn't want to update it automatically): There is a 'ticker' class which uses INotifyPropertyChanged, so it will automatically update the code from the site here Gone: Namespace theJoyOfCode.WpfExample {Public class ticker: INotifyPropertyChanged {public ticker} {timer timer = new timer (); Timer Interval = 1000; // 1 second update timer. Elapsed + = timer_Elapsed; Timer.start (); } Public Date Time Now {Get Date Date Now; }} Void timer_Elapsed (Object Sender, ElapsedEventArgs E) {If (PropertyChanged! = Null) property changed (this, new PropertyChangedEventArgs ("now")); } Private Event PropertyChangedEventHandler PropertyChanged; }} & Lt; Page.Resources & gt; & Lt;...

user interface - Elegant UI for associations with a lot of data -

I have an e-commerce website where many associations are required to create a product, a category, manufacturer, affiliate products , Etc. are required. When there is only a very small, limited amount of data, the manufacturer makes simple use of the drop down or options box for the user to choose the relatable field / field. However for related items like items, where I have thousands or products, it is not feasible to use any of these methods. I currently use a search / page table which The user again clicks on a button to connect the union, it works, but it takes a lot of time for the user, and not why I consider the ideal solution to the problem. Has anyone solved this problem or can they present any advice that how will it come from the UI perspective? Thanks for any help Autocomplete Recent Associations Smart Association What you are doing May be more on the base, so do not hesitate to add more details or screenshots and I think more about it. Au...

c# - How do you retrieve a snapshot of a website in ASP.NET? -

Can someone tell me how to re-upload an image or thumbnail of a website through my ASP.NET application? Can i get I have seen this functionality in some sites like Alexa etc. Try Free and Easy Use Service Just create your image tag like this: & lt; Img src = "http://SnapCasa.com/Get.aspx?code=[code]&size=[size]& Url = [url]" / & gt; sign-up is required, but it is free for 500,000 requests every month [code] is an API key that provides after sign-up. [Size] is one of the three sizes available [Url] is the website address for which you want to display thumbnails. If you want to work with the image from your code, here are some helpful methods: Fixed public byte [] GetBytesFromUrl (string URL) {byte [ ] B; HttpWebRequest myReq = (HttpWebRequest) WebRequest.Create (url); WebResponse myResp = myReq.GetResponse (); Stream stream = myResp.GetResponseStream (); // IT i; (Using binaryreader BR = new binaryreader (stream)) {// i = (stream.line); B = ...

javascript - flashObject 'is not a function' error only in Firefox -

I have a page with a flash chart to display. First of all, I call a separate AJAX call to capture chart data, and then process it on Javascript and I call the Flash object function like this: var flashObj = YAHOO.util.Dom.get (chartContainer); If (! YAHOO.env.ua.ie) {Flash obz = Flash objegés.jpgByTagname ("Embed") [0]; } Flash Obze .Setting Options (datax.xml.xml); FlashObj.SetAndParseData (dataXml.xml); FlashObj.Draw (); However, I get an error in Firefox "flashObj.SetSettingOption is not a function". I did not get it in IE8. Is it because the Flash object is not fully loaded? But then on the post-page tour, the flash object should be cached, but the same error appears. Edit: Also part of html here & lt; Object classid = "clsid: D27CDB6E-AE6D-11cf-96B8-444553540000" id = "mychart" width = "760" height = "455" codebase = "http://fpdownload.macromedia.com/get/flashplayer/current/ Swflash.cab "&...

business intelligence - Creating a semantic layer in QlikView -

I am trying to understand if there is a way to create a semantic layer, as you would with a catalog in COCAOS And in the Soup-Business Objects Universe, in Qyqiquay I am quite certain that this is not what you can do outside the box, but I am thinking that whether QVD and QVF files A combination of the way to achieve this Atmk no way. / P> You can effectively achieve it by creating a QVW which implements the data model and row level security Does not have any UI elements, these "data models" QVW (conceptually similar to a BO universe) can be used in various QVD applications that implement the user interface. "Data Model" QVW can be loaded into the UI using a binary load statement. There are some minor limitations with this approach, in which you can only make a binary load statement in a given QVW, and by taking this approach you effectively want to write your Io (you want to write " Data model "once down data on QVW, and then n times of UI ...

vb.net - How do I put an arraylist in a Listbox -

So I need help on an assignment and I'm trying to solve it for more than a week but I Need help on putting an array list inside the listback That is, the GUI should look at the end, all the information must be saved in the array list; I should be able to add a new customer; Click on a customer entry to edit it. list 1. Items.Clicker List 1. AddRange (al1.ToArray) Or, list 1. Items in the form of an object for every obj in al1 List1.Items.Add (obj) Or, list 1 . For the items.Clear I as an integer = 0 to al1.count-1 List1.Items.Add (al1 (i)) Next You override your object ToString in Arctic Will happen. You have to make the listbox font a fixed font so that you can do the courier. I would suggest using a generic.list (class client), although it is not in the assignment, you will be stuck in the typecasting objects in the array list. It still leaves the extension of one ton to solve that assignment, though. Best wishes

Getting Silverlight MVVM working with Expression Blend design time data? -

I am a big supporter of the MVVM pattern with Silverlight. Currently I wired the code behind the view ViewModel the ViewModel, I like this: public partial class SomePage: UserControl {public SomePage () {InitializeComponent (); // a new view modell and layout root word vm = new SomeViewModel (); Layout Root.DataContext = vm; }} and then all the binding views are handled and all the logic is handled in the ViewModel, as the pattern is intended. However, to wire them, this means that the designer does not work properly, and I can not use Expression Blend design time data. I know that there are such libraries such as MVVML Lite, which will help in doing all this work, but I do not like to bring a library because it has to deal with "one more thing". Is there a simple pattern for maintaining designing functionality, especially in Blend, to be wired in MVVM to Silverlight? I have done some googling but there are very old articles and there is so much confusion betwee...

java - date appears one day prior to what is programmed in JasperServer -

I posted it on the JasperServer forum, but I usually get better fortune on stack overflow. Please help if you can. My biggest complaint about JasperServer is that it behaves differently from flat out JasperReport (in particular, IReport ). Now I see that the date given in the parameter is displayed one day before (actually, exactly 4 hours before) given in the parameter. It is that I put the default value of JRX in the expression: ((New date). GetMonth () / 3) + 1 == 1)? Get new date (new date) (), 0, 1): ((New date). GetMonth () / 3) + 1 == 2)? Get new date (new date) (), 3, 1): ((New date). GetMonth () / 3) + 1 == 3)? New Date (New Date). GetYear (), 6, 1): New Date (New Date). GetYear (), 9, 1) This code works to correctly calculate JasperReports from the default value expression within the beginning of the quarter when I run it through the iReport , I do not see any problem I have run the report in this quarter, I am seeing it as a starting date on July 1, 2...