Posts

Showing posts from March, 2015

algorithm - Scheme How To Return Multiple Values? -

I've noticed that almost all scheme jobs can be returned only as a list output. In the following, I would like to return many values ​​of all adjacent nodes of the neighbors. (defined neighbor LW) (if (and (= 1l) (= 1w)) (list (and (L (+ 1W)) (and (+ 1l) W)))); How to output 2 or more values? In this case, I am testing for the first time if the node is in the corner, if so, then return 2 values ​​of coordinates where (L and W + 1), (L + 1 and W)) Basically if I (1, 1) return me (1,2) (1,2) and (2,1) apply only when the edge of the node Has only one neighbor, in this case I have 3 values ​​ When there is no increase, then I will have 4 returns. I I tried opposition, attachment , Su I do not want to work with any of the additional values. I need a sub-function. How should I implement it so that I can pass the return value and return all the adjacent nodes Can I reuse it for? Edit : I got the answer: The keyword " value " to return multiple values ​​Examp

iphone - MKMapView - NSUnknowKeyException -

I want to use with MKMapView with UITabbarController I solve any problem with other view controller applications but if I MKMapView with UITabBarController , MKMapView IBOutlet is not coding-like code <3> IBOutlet with its code and IB throws NSUnknownKeyException > Deletes the application is running fine. If I set the MKMapView application to IBOutlet , then it throws an exception. To change the UIViewController on TabBarController which will display your map: @interface MyMapViewController {MKMapView * mapView; } @ Property (non-monomeric, intact) IBOutlet MKMapView * mapView; Use inspector to change the MyMapViewController class from UIViewController on your tab bar controller

unix - dealing with files in php -

I'm making a file with PHP I just wanted to be able to create it with no content under a directory Am Then I want to be able to edit it when I use my server with FTP i can't! The user of PHP is different from the FTP user, and this last one is not allowed to change it! I tried Chamod, Umask, Chen, but nothing works, does anyone know how to do this? Thank you Cheers After you move or otherwise create a file in PHP, Just change permissions to use it: chmod ($ file, 0666); Do not allow executable permissions (which would be 0777) otherwise someone on the system could execute it. Huge security vulnerability

jQuery and ASP.NET advantages -

I am very confused that I thought about asking you about your opinion. I have code with some jquery asp.net but a developer group in my company who thinks JavaScript / jquery can be turned off and insecure if If Javascript is insecure, then why it is used at the first place What are the benefits of using jquery with a different ASP.NET cross browser, why not use Javascript? Should I use jquery in my ASP.NET applications? Here were some posts in which there were similar questions, but there was not a single good statement in it. Please share your thoughts. If Javascript is unsafe, why use it in the first place < / Blockquote> To provide advanced browsing experience to those who have it. What are the benefits of using jquery with a different ASP.NET cross browser, why not use JavaScript? Rapid Development If you are not comfortable with jQuery, then there is no problem directly in Javascript code. Should I use jquery in my ASP.NET applications? To

java.rmi.MarshalException -

Whenever I try to call my EJB with a customer, I receive this error: Java.rmi.MarshalException: Failed to communicate problems during marching / unsuspecting; The nested exception is: java.io.InvalidClassException: com.afrikbrain.util.message.MessageInfo; Local Class Incompatible: Stream Classes Serial YearsID = 2285009932770474121, Local Class Serial VERSIONUID = -2900394430145132451 at org.jboss.remoting.transport.socket.SocketClientInvoker.handleException (SocketClientInvoker. Java: 122) Why is this happening? And how to solve it? Local class and remote class are different versions. During the Unmarshalling process the receiver does not support the protocol version of the sender. Make sure that the compiled class on the server is the same version of the compiled class, so can be serialized / decarised without problems. I recommend you to rebuild and re-invent all the projects, and rebuild the stubs.

How do you avoid that people forget to run 'git push'? -

While evaluating the advantages and disadvantages of taking our Subversion-based repository to the cit, an interesting question was raised. Even if we like all the guitars very much, it could be that some developers (or developers' teams) forget about pushing a feature / bugfix on the repository that makes the package . I am sure that this concern has already been raised in other software development teams, I wonder how you faced this problem. I agree that ideally you can fix it by trying to give a lot of reminders. Some different ideas: Some things that strengthen the distributed version control idea will help people think more naturally about this. For example, I support a workflow that involves the use of local theme branches and as long as they do not really want to, I am amending / reducing the reservation. If you teach how to do this, then it becomes clear that this is the work done in your own field. As the developers are more aware that their repo is differ

multilanguage - several languages in codeigniter -

I want to apply several languages ​​to one site (codinator framework). There are four country flags in the design when the user clicks on any flag, then the page should load the information in the chosen language. No registration on site (site is quite simple) I should be like my URL: What is the best (the easiest) way to do this? Here's a code igniter guide for: < P> Unfortunately, no web structure will "solve" it for you, it can only make it easier that the content will be copied into languages, etc. This helps you in parallel to the MC part of the site. All these ideas will still need to be translated by you

postgresql - CakePHP putting quotes around function name in WHERE clause -

I am using various functions from the earthdistance module in PostgreSQL, one of these ll_to_earth latitude Looking at the / lenght combination, I am trying to get the nearest point of my database through CakePHP 1.2.5 Fixed. // set dummy data $ latitude = 30.4393696; $ Longitude = -97.6200043; // Create a simple bound box in a WHERE conditions, sort points according to location and the nearest point $ location = $ this-> location-> Search ('first', array '' fields '' array ('coders', 'coders', '' earth_distance (coors, llu_t_arth ($ latitude, longitude)) es distance ",), 'conditions' = = '= & Gt; ll_to_earth (' ($ latitude - 0.5) ',' ($ longitude - 0.5). '' '' '' '' '' '' ' 'Ll_to_earth ('. ($ Latitude + 0.5). ',' ($ Longitude + 0.5). ')', 'Command' => array ('distance ASC'),)); The SQL output

basic oracle question -

I used this query: Choose from all_source text where owner = ' (Name) = Bottom ('LECGROUPTIME') order has been received for finding the named reference function 'TOTAL' and LECGROUPTIME: Return LECGROUPTIME (varchar2 in invergroupCode) Select Varchar2 cursor gate time, day, start, time from program where the group code = inGroupCode; Maida varchar2 (10); MyFlag number; MyTimeVarcar 2 (200); Maybaf Vartar 2 (50); Mydub Vartar 2 (10); MyBuginTime Date; MindTime date; Start MyFlag: = 0; MyTime: = ''; Open GetTime; Get Loop GetTime InTo MyDay, mybeginTime, MyEndTime; Exit (GetTime% NotFOUND) or (GetTime% NotFOUND is NULL); Select Day from MyDayBuf Refrence where not = MyDay; If MyFlag & lt; & Gt; 0 then mytime: miteum || 'And'; end if; MyTime: MyTime || MardiBuff || To_Char (MyBeginTime, 'HH24: MI') || 'TA' || TO_CHAR (MyEndTime, 'HH24: MI'); MyFlag: = 1; End loop; Close GetTime; If MyTime = '' then My

javascript - all ajax ready event on jquery -

I am using $ (document). But it will not be ready for all AJAXs. After ending in Jquery I need a callback event after all Ajax load. < P> Ajax complete (callback); / P>

arrays - How do I know what data type to use in Python? -

I'm working through Python on some tutorials and in a situation where I'm trying to decide What type of data / structure should I use in a fixed position. I am not clear on the difference between arrays, lists, dictionaries and tuples. How do you decide which is appropriate - let my current understanding distinguish between them - they seem to be the same thing. What are the benefits / typical use cases for each one? Tuples first. There are things like this list that can not be modified. Since the contents of the tupal can not change, you can use the topless as a key in a dictionary. This is the most useful place for them in my opinion. For example, if you have a list like object = ["Ford Pickup", 1993, 995] and you have a list with prices If you want to create a small memory database, you can do something like this: ikey = tuple (item [0], object [1]) idata = item [2] db [ikey] = Idata The list appears to be used in array or other programming l

Python | How to make local variable global, after script execution -

Here's the code I need to do i getting a way to create a global so that Again, the value of i will be incremented by 1 rather than 1. I have the trace function to work in code in the second script, which I have embedded in 'main' I do All this is being done from Java. <__future__ import nested_scopes import sys import time from start time = time.time () timeLimit = 5000 DRR traceat (frame, event, RGR): if event == "line": elapsedTime = ( (Time.time () - startTime) * 1000) Time elapsed & gt; Time limit: Increase the exception, "execution time" + str (timelitit) + "has exceeded the time limit of milliseconds. The script will now end" return trait sys.settrace (traceit) def main ______ (): try: I + Exclude 1 = NameError: I = 1 main ______ () It is unfortunate that You have edited this question very heavy that people's answers appear unnecessary. There are several ways to create a variable scout within such a function,

c# - Visual Studio 2008: Project dependencies and build order all out of sync, plugin available? -

I have a huge project, actually 2 but they share many projects between each other. The problem is that When I compile with nothing, it is that, there is no DLL in my normal bin directory, it fails. This is due to the fact that some projects have previously Are not dependent. I have decided to run them manually and it works now. But I was wondering whether to compel the solution of any kind of plugin or move to dependency and construction order correct? It is also a secret that some projects have a tick in the project dependency dialog next to some projects and the other, why not consider any? Why does Visual Studio 2008 say "O that there is a dependency on that, but it is not when it is" :-)? If you right click on your project then you can go to project dependency and your current project On what basis can the projects be determined? Apart from this, you can go to a project builder order by right clicking so that your projects can be prepared.

How do I call Foo(long[][]) (C#) from Managed C++ (old syntax)? -

I have Foo (long [] [] existing C # code with long signatures) Which I need to call from unmanaged C ++ ( not C ++ / CLI) I __gc [] to please the compiler / Code> and __gc * are unable to understand the correct combination. With C ++ / CLI, this is straight forward: std :: vector < __n int64 & gt; Evens; Evens.push_back (2); Evens.push_back (4); Evens.push_back (6); Evens.push_back (8); Std :: vector & lt; __n int64 & gt; Odds; Odds.push_back (1); Odds.push_back (3); Odds.push_back (5); Odds.push_back (7); Std :: vector & lt; Std :: vector & lt; __n int64 & gt; & Gt; Ints; Ints.push_back (makes the same); Ints.push_back (odds); Array & lt; Array & lt; __n int64 & gt; ^ & Gt; ^ MgdInts = gcnew array & lt; Array & lt; __n int64 & gt; ^ & Gt; (Ints.size ()); For (size_t i = 0; i Edit: As I am using Visual Studio 2008, the "simple" solution is to insert the C ++ / CLI code into my file and comp

struct - Structure Generics in C# -

Please, help me with this problem: I try to define a structure like this I am: Unprotected communities sNodo < T & gt; {Public T information; Public sNodo & lt; T & gt; * SIzq;} But I get this error: Can not find address of a managed type sNodo's address, size, or declare an indicator, How can I fix this? I'm trying to create a "normal" stack using dynamic memory. Thank you for your attention If you need all the one Generic stack is required, you do not need unsafe just use the normal C # language: class stacknode What do you really feel that you need unsafe ? Perhaps you are thinking that you need an indicator because otherwise your type data can not be the same type of second instance as a member. Indeed, in C # if you try to: struct foo {int data; Fu next; } ... The C # compiler will complain about the circular structure references and refuse to compile your code (if you do not know why to do this, know this Try

How to proprly write string using jQuery -

I have a little jQuery with HTML, unfortunately it is not working correctly, can someone please advise How should he be happy? Bred = ("& lt; div class = 'TakeMeTo' style = 'width: + width +" px; right: "+ width +"' & gt; + + "" & Lt; / div & gt; "); Thank you for your help in advance I'm sure What is the meaning of "This is not working properly" from what you mean? Whatever the case, you can usually build dynamic HTML in such a way as: Pre var bred = $ ("div> ") . AddClass ("TakeMeTo"). CSS ("width", width + "px"). CSS ("true", width). Text (from where); Instead of setting the style attribute directly to , use CSS () . Alternatively you may want to use .html (whereTo) , which is appropriate, as appropriate. Why do so? Things will survive correctly.

Applying the REST architecture outside of the web: resource identification -

I am looking at implementing the remaining architectural styles in a binary network protocol and I know how to identify the server The resource is in a way which will be true for style, probably because I am used to seeing the URI. For example, an address-port pair will be eligible as a resource identifier; Assuming a resource per pair? In this case actually the resource in the request is not really recognized. Do anyone have any experience in creating non-web based REST protocols? You are right that REST is independent of HTTP and URIs. Here is an example of a receipt system that uses HTTP and JMS (), whereas your app is not a direct map, but it can give you some ideas. Think of an identifier as an unfamiliar text value, can solve an endpoint within the place of an address that can represent the resource and what you need. When I give a presentation on REST, I display a system using identifiers such as: Fib (3) and 1 / 4 To make it clear that the URIs are not re

c++ - Problem with method defined in VC++ header file -

I have a class in a DLL that is used in many other DLLs and EXEs. Some of the files contained in this are defined methods (i.e. method is in the body .h file) which is included in other binaries. One of these fits me: int GetVersion () {return nVersion; } . It is always returning -842150451 , but when I run into debugger and see the class member variable, nversion is 100 . Any ideas as a way to debug this problem? I'm really stuck. (Note: This is working fine for a decade! But now we are moving our code from VC6.0 to VS2005, and this is not smooth ...) < Div class = "post-text" itemprop = "text"> The value in hex looks like 0xCDCDCDCD, which is normally an undisclosed memory in debug build. Are you sure the nVersion has been started?

What does out[i] = *(a_mat + i) do in C? -

जबकि (i & lt; a_rows * a_cols) {बाहर [i] = * (a_mat + i); // यह लाइन I ++; } चिह्नित रेखा क्या करती है? यह a_mat + i द्वारा जो भी इंगित किया गया है उसका मान हो जाता है। इसके बजाय a_mat [i] लिखा जा सकता था।

css - How to position an input form at the center of a page? -

I want to create a registration status in the center of a page. Please tell me how I do this with the following CSS properties Encapsulate it in a div: & lt; Div style = "width: 400px; margin-right: auto; margin-left: automatic, range: 1px solid # 000;" & Gt; & Lt; Form Action = "Hello World" & gt; & Lt; Some markups & gt; & Lt; / Form & gt; & Lt; / Div & gt;

asp.net - jquery: select and unselect items of listbox -

I have 2 listboxes in the ASP.Net page (select in HTML) I want to know when one item of list 1 If selected, then the selected item in list 2 has not been deselected, and the Vice President 2 selections are exclusive to each other. How can I do this? $ (function () {var list1 = $ ("# listbox1"); var List2 = $ ("# listbox2"); list1.change (function () {$ ("option", list2) .attr ('selected', false);}); list2.change (function () {$ (" Option ", list1) .attr ('selected', false);});});

c# - Resize image gdi+ graphics .net -

I have this method of shrinking an image for that website on which I am working: Static Byte [] Create Short Routes (blogfoto blogfoto, int newmaxwidth, int newmaxhit) {Image img; (Memorystream original image = use new memorystream (blogfoto blogfoto image)) {img = Image.FromStream (original image); } Int Nudith; Int newHeight; Byte [arr] If (img.Width> img.Height) {if (img.Width & lt; = newMaxWidth) {(memory stream thumbStr = new memorystream ()) {img.Save (thumbStr, ImageFormat.Jpeg); Img.Dispose (); Arr = thumbStr.ToArray (); } Return arr; } NewWidth = newMaxWidth; NewHeight = (int) ((Float) New Wideth / (Float) IMG Width) * (Float) IMG Highlight); } Else {if (img.Height & lt; = newMaxHeight) {(memory stream thumbStr = new memorystream ()) {img.Save (thumbStr, ImageFormat.Jpeg); Img.Dispose (); Arr = thumbStr.ToArray (); } Return arr; } NewHeight = newMaxHeight; New Wide = (int) ((Float) NewHigh / (Float) IMG Highlight) * (Float) IMG with); } Image thumb = new bitm

windows - Rails Comments on View if-end statement screw up rendering on Linux/Apache/FastCGI -

The following code works under my Windows development environment, but not on my production Linux / Apache 2 / FastCGI NV. In my scene File: & lt; Td id = 'first_column' class = 'column' & gt; & Lt;% content_for: Heading # Do not stop this content: HEAD% & gt; & Lt;% = stylesheet_link_tag ('live_tree')%> & Lt;% = javascript_include_tag "live_tree"%> & Lt;% end # content_for% & gt; & Lt; Div id = 'contentpanel_13B' & gt; & Lt; Div id = 'category_howtos_container' & gt; & Lt;% = Render: Partial = & gt; 'Howtos_for_category'% & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt;% cache ('category_gadget' + I18n.locale.to_s)% & gt; & Lt; Div class = 'main_container gadget' id = 'categories_container' & gt; & Lt;% = Render: Partial = & gt; 'Categories'% & gt; & Lt; / Div & gt; &

javascript - Firefox addon code for every tab open -

I am enclosing some functionality for javascript by making a firefox addon. Although coding in chrome and chrome overlay is triggered for every load tab while listening to the load event, but the "content" variable only indicates a tab in the foreground currently. How can I get the content from a Firefox addon to the document load on each tab Say that you have a reference to the aEvent.originalTarget document that you want to use each time a new page load (which you really want to use if you are not) Was there.

.net - Is EXE locked (vs DLL)? -

If I put all my controls inside XEE, then it might be accessible from the outside as if it was a DLL? As mentioned by Bobby Shoffoi, it depends on whether you have managed or unmanaged code , But 'I' assuming you are using unmanaged C or C ++. Basically, a compiled executable (in the case of Windows, the XE or DLL) is a group of functions and global variables, and each one has a special location in the logical address space of each executable (which When executable loads are mapped to physical memory addresses). If someone knows the address of a particular function or variable in their executable, you can do so to prevent it from being used & mdash; But in a DLL, this information is actually available, so people can actually see their actions (well, those you have chosen to export). Usually you will provide a header file with your DLL, which handle the look of this name, so they have to call the function as if they were part of their own program.

Drupal Cache & Stylesheet Switch -

I am using a very simple stylesheet switch from PHP. It was absolutely fine but the day before I turn on caching mode And now it only works for the login user. If caching mode is turned off, then it will work again for both users. Actually the code looks like .php header in the page & lt ;? Php if (isset ($ _ cookie ['style'])) {$ style = $ _ cookie ['style']; } And {$ style = 'green'; }? & Gt; & Lt; Link type = "text / css" rel = "stylesheet" href = "/ css / Switch to & lt; A href = "http://www.mydomain.com/switch.php? Style = blue" & gt; Blue & lt; / A & gt; in switch.php & lt ;? Php setcookie ('style', $ _GET ['style'], time () + 31536000); Header ('location:' $ HTTP_SERVER_VARS ['HTTP_REFERER']); ? & Gt; I did a lot of research, but could not get it right. Please help if you can. Thank you Hmm, I do not think why you can

Using Ruby to access LDAP DIT -

We use ACL to provide access to the svn repository. Users / groups are stored in LDAP (OpenLDAP 2.4 (LDAP 3), whether any library / package (gems) uses or uses it. Basically, I will follow the LDAP DIT and based on it my Connect the ldaps: // xxxxxxxxxxx: 636 Travers DIT (subdivision based on 'OU') Read the attributes svn type acl file. This issue What to do, it has a high level of overview, so my question is in relation to the LDAP package / library which I could use. I have heard of Net: LDAP.I am very new to Ruby, so , I am learning this as I go along. Also, please correct me if I make a mistake. We are using ldaps: // This means that when I use Ldap Connect to server Do I need to do something special to handle the certificate? Thanks I have used before, work with me has been cured. A code example that comes with gem.

Flex : How to display a DataGrid selectedItem's details in a Form -

Sorry for this long post. The question is small, but the full details are required. Thanks for reading and helping :) I used the HTTPService POST method to call a PHP file that gives me the result of an XML type like & Lt; User & gt; & Lt; Name & gt; Jones & lt; / Name & gt; & Lt; Age & gt; 34 & lt; / Age & gt; & Lt; / User & gt; This result is obtained after php files are asked for a database. Database also has other information (height, gender, education and address) I now have dataprovider = "{userRequest.lastResult.User}" datagrid (two columns: name and age) and a form Using the attribute, the above xml data is displayed in the datagrid. I I now use the itemclick = itemClickEvent (event) C I do so when a user clicks on the second row of Detagrid related line went click (height, gender, has been placed under the data grid GUI which can be seen in education etc.) form. For now my itemsclick events look l

ruby - Using Rack::Session::Datamapper -

Mkristgan's gem says that it can be used in a specific environment, namely rack :: session :: datamap . Unfortunately, I do not know enough about Ruby to complete this task - the modules / classes in Ruby are still above my head (coming from PHP). Can Rack :: Session :: provide a support in using rack_datamapper to implement datamap? You probably do not want to do this anyway. The answers given below are very good, but on closer consideration, I realized that I should not do this anyway, instead, I use the User ID, IP and First name in the cookie ( For convenience) and keeping it safe. should help: Just add to Sinatra: Usage rack :: Session :: Moneta, Store: Monta. New (Datamapar, Setup: (NNV) ['DATABASE_URL']] "sqlite: // # {Dir.pwd} /development.db")) and sessions [ ] will use the object.

c++ - windows form application -

I have code about the AVL tree in C ++ and all the functions are ... this code is in win32 consol Can I include it in the project in the Windows Project without writing it again or in a much simpler effort? Because I have a lot of projects in the console and I want to upgrade it so thank you so much. Look for some names This allows you to create a Windows Forms application in certain quotes of C ++ Will give Another option is to complete your code in DLL and use PInvoke to execute the code from it. Just make regular C # applications to reuse your code

ASP.NET + GridView + EmptyDataTemplate -

I have ASP.NET GridView that uses EmptyDataTemplate to use this template to collect data in this event It is done that there is no record in my data source. My GridView source looks like this: & lt; Asp: Gridview id = "myGridView" runat = "server" DataKeyNames = "ID" OnRow Edit = "myGridView_RowEditing" OnRowCancelingEdit = "myGridView_RowCancelingEdit" OnRowUpdating = "MyGridView_RowUpdating" ShowFooter = "True" EnableModelValidation = "True" & gt; & Lt; Columns & gt; & Lt; ASP: BoundfieldDefined = "id" visible = "false" /> & Lt; Asp: TemplateField HeaderText = "name" & gt; & Lt; EditItemTemplate & gt; & Lt; ASP: text box id = "textbox" "runty =" server "text = '& lt;% # bind (" name ")% & gt; & Gt; & lt; / asp: Text box & gt; & lt; / EditItemTemplate & gt; &

jquery - json result returns error -

मेरे पास एक जेसन सरणी है var states = {"1": "कैलिफ़ोर्निया", "2 ":" ला "}; मैं राज्यों में वस्तुओं को कैसे गिना और मुद्रित कर सकता हूं। इसे प्रिंट करना चाहिए। अगर मैं राज्यों का उपयोग करता हूं। लम्बाई यह एक त्रुटि देता है यदि आपको किसी ऑब्जेक्ट के सदस्यों की गिनती की आवश्यकता है तो आप यह कर सकते हैं: के लिए (राज्यों में वैल) {अलर्ट (राज्य [वैल]); गिनती ++; } चेतावनी (गणना);

multithreading - Is the Python GIL really per interpreter? -

I often see people looking at that GIL is against Python interpreter (here also on StackerVarF Flo). But what I see in the source code is that GIL is a global variable and therefore there is a GIL for all interpreters in each dragon process. I know that they did this because there is no interpreter object passing like a Loo or TCL, it was not well designed at the beginning. Python is not portable for the use of local storage python people. Is that correct? I had a small glance of version 2.4 which I am using here in a project. Has it changed to later versions, especially in 3.0? GIL is not really per-process, per-interpreter. It is unchanged in 3.x.

python - parsing string to a dict -

इस सवाल का पहले से ही एक उत्तर है: < / P> 10 उत्तर मेरे पास एक स्ट्रिंग आउटपुट है एक विशेष शब्द के रूप में है {'key1': 'value1', 'key2': 'value2'} कैसे आसानी से इसे एक शब्दकोश के रूप में सहेज सकते हैं और नहीं के रूप में एक स्ट्रिंग? astr एक स्ट्रिंग है जो "एक शब्द के रूप में" है ast.literal_eval इसे अजगर डीक ऑब्जेक्ट में कनवर्ट करता है। में [110]: import ast में [111]: astr = "{'key1': 'value1 [113]: ast.literal_eval (astr) बाहर [113]: {'key1': 'value1', 'key2': 'value2'}

How can I tell that a directory is the recycle bin in C#? -

By looking at a folder, how can I tell if this is the recycle bin? I have not found anyone for C ++, but not for C #. My first idea was to check for fileAttributes.System (which would be an acceptable estimate in my case), but in reality this flag recycle folder. Crude solutions are using hardcoded folder names (we are all after 2009). There is a small problem here The Windows Recycle Bin is a virtual folder and does not actually exist. The files that you see are not actually in that folder, they represent the existing files on the disk which have been replaced as a special name, which are removed from the "visible file system", but physical Not by appearance You can "proof" for yourself by asking for the folder location using the Win32 API. It will return E_FAIL to the Recycle Bin, but not for other folders (can use all the content (see) and announcements required to run this code): Interputer Footer RecyclableBlink Path; // Try it to see it wit

iphone - Problem in Reloading UITableview..! -

I am parsing two XML files with a XML parser class, I have a table view where after parsing the data Is displayed here .. Here is an image and label, when I parse the first XML such that I parse myxml_1.xml and then displays the data in the table, it looks fine Used to be. But when I re-paste xml named myxml_2.xml and displays the data in that table, the UI label displayed is ok, but the image is not displaying properly, it is always Displays the images in my first xml. I used mytableview.reloadData ... but there is still a problem. Here is a code that is placed in the cellophore index path. View the label /// label of [ Your help will be appreciated ..! Thank you. One major problem with what you are showing here is that you can send data inside a cellphone Synchronizing Loading: AtIndexPath: The method of UITableViewController is that a tableview is created to show that method every time the screen is displayed. If a user is scrolling up and down your view, the met

c# - Perform Data Analysis on Sql Server or in .Net? -

I have some data analysis that needs to be performed. On average, somewhere in between this would be somewhere between 50K-150K rows. From these lines, I need to remove the sum of the calculus (x) along with the sum (x) plus five different criteria. There are two ways to go about this: Write 10 different questions, designed to collect data from column X using each of the equals () or calculations () has gone. Run each and get results using SqlCommand.ExecuteScalar (). Create a custom object to include all the different criteria, which is necessary to evaluate different situations. Run a query that will return all the data needed to create a superset of all different conditional subsets using SQL Commands.execcadata reader (). Read each line from the DataReader in a new object, adding each list to the list store. All data is retrieved, use Linq-to-Object to define different amount () and calculation values ​​() based on different conditions. I know that I can try every one t

wpf - Designing with Blend but loading styles at runtime -

I have a large WPF application and I want to use Blend 3 to speed up my UI design on some parts of it. I am trying to The problem I run is that I have different skin users can use, so I load resource codes and converters at runtime at the application level. For this reason, when I open a .xaml file in Blend, it does not get the brush / styles that are referenced, which means that I can not find the actual format of UI I am amending. The only way I found it to fix is ​​to add the context of all the resources that the .xaml file is using in the .xaml file in Blend, then I remove them later Give it Is there some trick to make this work easier? You can find some information about how to fix this problem:

Why byte-addressable memory and not 4-byte-addressable memory? -

Why does not the computer have byte-addressable memory, and 4-byte-addressable memory (or 8-byte-addressable memory For 64 bit)? Yes, I see how it can sometimes be useful, it sounds just insensitive and excessive. Are the benefits enough, or is it really due to heritage? "post-text" itemprop = "text"> Really enter 64-bit volume in memory (x86 after Pentium or so on) ; 64-bit processors often have 128-bit buses, in addition to reaching the main memory, you have a full cache filled fittings, which are also large units of memory. This only addresses a byte-based address; It adds a little upper and it is not excessive. Today, you need exactly a byte-based address for the networking protocol. It will be difficult to apply TCP with a word-based address: If you receive 17 bytes, what should you read (to) get back? Similarly, higher layers are byte based: If you get a request line like "BOT / HTTP / 1.0" then it will be very difficult to be present

javascript - QUnitAdaptor for JSTestDriver passing failed test -

By using quoted adapters to test my quinnit tests, it has actually passed an examination that should fail: Exam ( "Very simple test", function () {var somevar = true; equals (some, wrong, "test");}); The above test was passed when I went after capturing the browser program. Has anyone experienced the same problem? If so, how did you get it? I am using Quinnit Adapter 1.1 with equiv.js, Asserts.js and JSTestDriver1.1. I was able to reproduce the issue: It seems that if you already Once you run the suite and then add this test, then no new test comes out (and it passes). The trial was actually added to the suite and was unsuccessful because only by restarting the server and repeating the browser again it should have been in place first. It is also not to know that it is of any help to you, but I still suggest you try to restart the server and try to retry the browser and then try again .

c# - How to track "freezing" app, finding its source? -

I have a server with 3 threads and one is Threadpool for data processing. Customers are using only locks (reader and author) for connection lists. I sometimes freeze main forms for each other and I can not find the problem. This form does not work any hard, it is for different threads. I wanted to ask the washer how is it no way to track "freezing"? Any help is greatly appreciated, thanks! You can try to run a programmer on your app and isolation problem. I am playing around, it looks like a really good utility and is totally free. This shows you really useful statistics in some ways, such as the time spent in each method. If you are equipped with this information, then it should be a long way to track your problem. I have not tried yet on a multi-threaded app, so I'm not sure how it works differently threads. But it's worth a shot (as I said) it's completely free (BSD license) and easy to use.

xslt - Missing <?xml version="1.0" encoding="XXXXX"?> after transformation -

I am facing a problem after the conversion of an XML file and after saving it, i mean the XML file Can not find the top tag & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; . Below is my XSLT file: & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Xsl: stylesheet xmlns: xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0" & gt; & Lt; Xsl: output method = "xml" indent = "yes" encoding = "UTF-8" omit-xml-declaration = "no" /> & Lt; Xsl: template match = "*" & gt; & Lt; XSL: Copy & gt; & Lt; Xsl: copy-of select = "@ *" / & gt; & Lt; XSL: implemented-templates / & gt; & Lt; / XSL: Copy & gt; & Lt; / XSL: Templates & gt; & Lt ;! - ... - & gt; & Lt; / Xsl: stylesheet & gt; I think that due to errors due to the absence of this tag "an invali

c# - No OpenID endpoint found. - .Net OpenID -

I I'm using OpenID (). I'm using OpenID a website, I'm running a MVC model outside the box and I get the following error while selecting Yahoo / Google. No OpenID endpoint found An error occurs on this line of code Return OpenID. Crayerut (request form ["openid_identifier"]). Redirectioning Response.ASActorSult (); What does this error mean? And is there any common problem - can we try shooting? To add value to the bus - request. Form ["openid_identifier"] https: // www .google.com / accounts / o8 / id First, check to make sure that the request is made. The farm ["OpenID_IDrDfire"] is returning a valid URL (the openID path for Yahoo or Google). If it is not so, then you have a problem with the selector of your open. If this is the case then the request is being requested, but the Oppen's provider is not reacting at that time, due to which "you have not got any open-end endpoint". Try to re-issue the re

.net - Comparer.Compare needs one Object that implements IComparable but will throw exception if not the first parameter is -

In order to compare the function in a comparative class, the document says: One tool applies, then one. Compare (B) has been refunded; Otherwise, if B has implemented the ii copperball, then the denial of B. is the result. Compare (A) is returned. But when I test it, it grows fast as it demands that the first input to Icomparable will apply to the following code: class program {static zero main (string [] args) {test t1 = new test (); Test 2 T2 = New Test 2 (); Int i = equalizer Default.computer (T1, T2); }} Class Test {} Class Test 2: ICAPPable {Public Entry Quota (Object OBJ) {Return 0; }} Is it just me or what is wrong? The detector says that it only checks when an IMPM is applicable. Public ent (object A, object b) (if (a == b) {return 0;} if (a == blank) {return -1;} if (b == Blank) {return1;} if (this.m_compareInfo! = Null) {string str = a as string; string as str2 = b string; if ((str! = Null) & amp; (str2! = Null)) {This return.m_compareInfo.Compare (st

Wrapping C++ class API for C consumption -

I have a set of related C ++ sections that should be wrapped and exported so that it's easy to do with DLL Consumed by C / FFI libraries I am looking for some "best practices" to do this, for example, how to create and handle free objects, how to base classes, alternative solutions, etc. ... < / P> Some of the basic guideline methods so far Not have to return to an extra zero to convert simple with the * argument constructor to any representation of this' pointer with devastating retain their original argument list, but an indicator representing the object. Any advice is appreciated / div> Prerequisite public mode requires a C function. In C code you also need an opaque indicator to represent your class. It is easy to use just a zero *, although you can construct such a structure that contains zero * and other information (for example if you want to support arrays?). Fred .h -------------------------------- #ifdef __cplusplus Categor

mysql - SQL: deleting tables with prefix -

How to delete my tables that have the prefix myprefix _ ? Note: The need to execute it in phpMyAdmin You only assign it to a single MySQL can not do with the command, although you can use MySQL to create a statement for you: In MySQL shell or through PHPMyAdmin, use the following query < Pre> SELECT CONCAT ('DROP TABLE', GROUP_CONCAT (table_name)), ';') from the AS statement, information_schema.tables WHERE table_name 'myprefix_%'; This will generate a DROP statement that you can copy and execute to drop from the table. EDIT: A disclaimer here - The above generated statement will drop all the tables with that prefix in all the databases if you want to limit it to the specific database, modify the query to look like this And replace database_name with your own database_name: SELECT CONCAT ('DROP TABLE', GROUP_CONCAT (table_name), ';') info_schema.tables from the AS statement WHERE table_schema = 'database_name 

sql server - How do I run SQL queries on different databases dynamically? -

I have a SQL Server stored procedure that I use to backup data from our database before I upgrade, and I Actually passing as a database in the form of a database and being able to run the process stored on many databases. Is there an easy way to do this? Best of all, I can understand that SQL is dynamically created in stored function, but it seems that there is a wrong way to do this. There is no other way to do this. Dynamic SQL is the only way; If you get strict control in the name of DB and who is running it, then you are sorting everything together, but if there is no definitive use to avoid the parameter safely: Purchase Process DoStuff @dbName NVARCHAR (50) DECLARE @sql NVARCHAR (1000) SET @sql = 'SELECT stuff FROM' + QUOTENAME (@dbName) + '..Technname where accessories = other content EXEC SP_ExecuteSQL (@sql) Obviously, if anything else is happening, then you can check any other input again Use the potentially parameterized dynamic SQL, for example:

html - disable text drag and drop -

is a common feature of modern browsers where a user can select some text and drag it into the input field in the same area Within this it leads to the text, imitates between different areas, how do I disable it? If there is no portable way, then I'm more interested in Firefox. It is an intranet webpage, so I'm also interested in modifying the browser / getting the plugin for it. Maybe some system-level settings (on Windows XP)? I need to keep the default selection-copy-paste functionality. In the background, I have many field data entry forms and users often mistakenly drag something. This code will work in all versions of Mozilla and IE function preventDrag (event) {if (event.type == 'dragenter' || event.type == 'dragover' || // If drag on event - Allows drop event To capture, it is not allowed to drag on the target event by default. Type == 'drop') // Stop text dragging - IE and new Mozilla (like Firefox 3.5+) {if (event. StopPropagatio

tomcat - Clustering a Java EE Web app - Options? -

I have a web app that is stationed on Apache, Tomcat and three servers running a load balancer in front of them. Now I am thinking of clustering them. Here are the general options and my barriers I know about: Serialization based session clustering: In my case, in the session session, many objects Uses. So I do not like to go with this solution. Furthermore, in the near future there is not much increase in the number of servers. Terracotta: Interesting but there is no alternative to buying enterprise licenses. Make the app stateless: looks enticing, though it is a little bit of a task. Any other advice? My primary goal is failover. If you intend to use clustering, then the individual user session avoids the loss of a server, then you will need to pay some type of transfer cost. You might: Put everything in a database, maybe sorted as a blob. When the session expires, you need those home-based blops that have the capability in app servers such as WebSphere.

c# - Make Hashtable immutable -

How can I create derivative classes from Hashtable, objects which can be added, but can not be removed or can not be changed? P> What to do to override me and especially how I override the [] operator Can i At least, you clear , remove , property value and index / code> item . You can override indexor item using syntax: override the public [of this object] {{Setup implementation} Set {// set Implementation}} You need to override the clear so that a user can not clean the hashteble. You need to override the remove so that a user can not get hit from the hashtable, you need to override the value because one user is Icoding You can use that which has been returned to modify the value in the hashtable, you have to override the item for a similar reason.

java - Is Hadoop right for running my simulations? -

has written a staunchic simulation in Java, which loads data of some CSV files on the disk (approx. 100MB total ) And the result is that there is also a parameter file in any other output file (not just data, only a boolean and some number), and for different parameters, the distribution of simulation output will be expected to change. To run multiple simulations in multiple input parameter configurations, check out the correct / best input parameters, and see the distribution of output in each group. Depending on the parameters and randomness, each simulation takes 0.1-10 minutes. I am studying about Hadop and thinking whether it can help to run many of my simulations; In near future, I can have access to about 8 network desktop machines. If I understand correctly, then the map function can run my simulation and remove the result, and reducers can be identified. The thing that I am worried about is HDFS, which is for large files, not a mess of small CSV files (none of which ha

sql - how to group by and count using MySQL -

I have data that looks like this: ID post_author post_title guid 330 9 21 what Should not anyone have yet to wait for SQL 2008 SQL 2008 R2, because this release is near? Http://sql.stackexchange.com/questions/379/should-somebody-not-yet-on-sql-2008-wait-for-sql-2008-r2-since-its-near-release1695 429 How We Do Can you naturally drop the advice of well meaning from sleep? Http://moms4mom.stackexchange.com/questions/1208/how-do-we-politely-decline-well-meaning-advice-from-the-grandmother 553 How to Become a Great Father Read books http: // moms4mom .stackexchange.com / question / 1042 / book-on-how-of-one-great-papa 160 30 Creating a Ice Hockey Net Camera http://photo.stackexchange.com/questions/8/building-an- Ice-hockey-net-cam 159 30 General Professional Photo Release Form http://photo.stackexchange.com/questions/4/generic-commercial-photo-release-form I need to make a query This group is on the part of the GUID field (Route URL) and data on the prefix POST_AUTHOR counts to be.

uri - So what IS the right direction of the path's slash (/ or \) under Windows? -

It seems that windows emphasizes writing a backslash \ in the file path, while NIT's URI class writes them with slash / . Is there a right way, which is accepted even in the most primitive systems? And why is it? Does Net's URI show a second slash in comparison to the rest? A file path and a URI is different \ in a Windows file path Is correct and correct in the / one URI. Then this file path: C: \ Documents \ FU translates this URI: file: ///.c: / document / foo

Netbeans Midlet Screen Flow Auto-Organize -

I am designing this JME application for a Nokia phone and when designing midlet screen flows, my netbeen Now to look at all shapes, in some form of easy form I have not designed the formats designed on each other Is there a button or setting that I can use to rearrange everything? It can be done by clicking on a format button in the window located next to 'Analyzer' Was it something simple that was something simple.

c++ - Class 'is not a template type' -

इस त्रुटि का क्या अर्थ है? Generic.h: 25: त्रुटि: 'जेनेरिक 'एक टेम्पलेट प्रकार नहीं है यहां सामान्य है। टेम्पलेट & lt; class T & gt; कक्षा सामान्य: सार्वजनिक QObject, सार्वजनिक CFG, सार्वजनिक आभासी मूल्यांकनकर्ता {Q_OBJECT std :: string key_; std :: वेक्टर & LT; std :: स्ट्रिंग & gt; layouts_; std :: वेक्टर & LT; std :: स्ट्रिंग & gt; static_widgets_; Std :: नक्शा & lt; std :: स्ट्रिंग, std :: vector & lt; widget_template & gt; & Gt; widget_templates_; Std :: नक्शा & lt; std :: स्ट्रिंग, विजेट * & gt; widgets_; Int type_; एलसीडीड्रापर * आवरण +; संरक्षित: एलसीडी पाठ * एलसीडीटीईटी_; सार्वजनिक: सामान्य (जेसन :: मान * कॉन्फ़िग, इंट प्रकार); ~ जेनेरिक (); शून्य सीएफजीसेटअप (एसटीडी :: स्ट्रिंग कुंजी); शून्य BuildLayouts (); शून्य प्रारंभरेखा (); Int GetType () {return type_; } // टी * GetLCD () {वापसी एलसीडी_; } एलसीडी पाठ * GetLCDText () {वापसी एलसीडीटीईटी_; } आभासी शून्य कनेक्ट () {}; वर्चुअल शून्य सेटअपडिवाइस () {}; Std

accessing local file from php -

I am trying to gain access to a file on a client computer so that I can later get an outgoing email (resume. Pdf) Ive found some clip code, but I'm having trouble doing this for me The code below shows all the things that are gathered about my file To think, but I guess I could not shut it up to work yet. & lt; Input ID = "Resumeup" name = "resumeup" type = "file" /> php code: $ _FILES = $ _POST ["restart"]; If (($ $ _FILES ["file"] ["type"] == "image / gif") ($ _FILES ["file"] ["type"] == "image / JPEG") || ($ $ _FILES ["file"] ["type"] == "image / PJPEG") & amp; ($ _FILES ["file"] ["size"] <20000) {if ($ _FILES [" File "] [" error "]> 0) {echo" error: ". $ _FILES ["file"] ["error"]. "& Lt; br / & gt;"; } Else {Resonance &qu

How to Sort JSON Products with PHP -

मैं इन दोनों उत्पादों को "आईडी: 17 मान: ###" { "id": "16", "मूल्य": "एल AOC000"}, { "id": "17", "मूल्य": "6.00"}, { "id": "18", "मूल्य" : "10.00"}, { "id": "19", "मूल्य": "7.52"}, { "id": "20", "मूल्य": "4.75"}, { "id": "21" , "मूल्य": "मूल्य": "" "" "" "" "": "16", "मान": "एल-एओसी 001"}, {"id": "17", "मान": " 7.00 "}, {" id ":" 18 "," मूल्य ":" 11.00 "}, {" id ":" 19 "," मूल्य ":" 6.52 "}, {" id ":" 20 "," मूल्य ":" 5.75 "}, {" id ":" 21 "," मूल्य ":" 4.50 "}

recursion - Recursively creating a multi-dimensional array in PHP -

I am trying to find out the best way to write a PHP function, which is a multi-dimensional array with an unknown The sub-level number from a mysql table will be re-purposed to create a data structure that can be stopped to create a navigation menu on a website, with each menu item there is a submenu with hair menu items. . Field of Notes in the table: EITIIDIT ITIPITID VirtualMatTest Text ItemLink • TNIINS KDrl The function will be an example of an array returned : $ MenuItems = array (itemID # => array ('ItemText' => 'Home', 'ItemLink' => 'index.php', 'Children' => Array (itemID # => Array ('ItemText' => 'Home all 1', 'item linked' => 'some pages .php', 'child' => 0), item id = = array ('item' text '=' 'home all 2 ',' Maddink '=>' somepage2.php ',' children '=> 0),)), item id => array (' item text '=>

java - why does junit4 not have Assert.assertArrayEquals() for double[]s? -

It appears that assures. AsertArrayEquals () Methods in Junit4 for all other Priorities other than Dual, for example assurance.CertAreaEclocks (integer [] expected, int [] genuine) and Assert.assertArrayEquals (four [] expected, four [] genuine) but not < Pre> Assert.assertArrayEquals (double [] required, double [] real, double eps) or Assert.assertArrayEquals (double [ ] Expected, Double [] Actual, Double [] eps) (The variable of the doubles later Account for Ion) Is there a fundamental reason why that should not write me function? There is no such method (in 4.7), although it is not documented on online Javask. This was definitely an inspection in Javadoc / version, but now it is.

orm - NHibernate and many to many mapping -

I have a 3 table organization (ID, name, and so on) Organization Contacts (Organization ID, Contact ID, Status) ID, name), email) How can I make multiple mappings and use the Status column from the organization? Strict several-to-many mappings, you will have organization ID and contact ID in the mapping table. Adding the Status column will require creating a proper unit outside the organization.

Resizing HTML images breaks ratio -

The image of the card (bottom right) displays differently in Chrome and Firefox. In Chrome, its proportion is preserved, but the ratio in Firefox is twisted. I can resize an image continuously, cross-browser (originally what happens to Chrome now) Ideally you want to avoid allowing the browser to resize the image. Different browsers achieve different levels of quality, which you can get with a dedicated digital image editor (Photoshop, Paint.Net, etc.). Before publishing, it's best to resize it in the desired dimensions, then set the actual height and width clearly in pixels.

What is the email subject length limit? -

How many characters are allowed in the subject line of internet email? I was scanned but could not specifically see how long it was allowed. I have a colleague who wants to programmatically valid for this. If there is no formal limit, then what is a good length in practice to give suggestions? Cheers, See, start section 2.1.1. There are two rows that put this standard on the number of characters in a row. Each line of characters will not exceed 998 characters, and excluding CRLF, should not exceed 78 characters. As RFC later tells you, you can work around this limit (not what you want) by adding the subject to multiple rows. Each header field is logically a line of characters in the field names, colon, and field body. However for convenience, and to deal with the 998/78 character limitations per line, the regional part of the header field can be divided into a single row representation; It is called "fold", the general rule is that wherever a standard whit

installer - setup file for window application -

I have created a setup file. It is working fine, but I want an image for my setup when I do any If I install setup in the system then I need some picture on my setup Help me, u Thank you I'll tell you how to change it in Visual Studio to change the Setup.exe icon You can do the following: Create your setup project Open the setup.exe file, just create, file -> Open -> File Right click on the icon node in the File Explorer window and select Add Resource Import the icon that you want into the popup dialog and make sure that the icon's icon It is smallest.

c# - COMException when using Windows API Code Pack -

I downloaded the Windows® API code pack for Microsoft. On the Net Framework On the test of the solution on VS 2008, I get an error in line IKnownFolderManager knownFolderManager = (IKnownFolderManager) New known folderManagerClass () ; KnownFolderManager.GetFolderIds (Outside Folders, Count Out); Details given below, system.timetime. Interp Services COMException was unrestricted for message = "Recover COM class factory for CLSID {4DF0C730-DF9D-4AE3-9153-AA6B82E9795A} failed due to the following error: 80040154." Source = "Microsoft.WindowsAPICodePack.Shell" ErrorCode = -2147221164 StackTrace: On Microsoft. WindowsPicodePack Shell.nofofolders.getAllFolders () in D: \ WindowsAPICodePack \ WindowsAPICodePack \ shell \ known folders \ known folders.cs: line 43 on Microsoft.WindowsAPICodePack. Shell.KnownFolders.get_All () in D: \ WindowsAPICodePack \ WindowsAPICodePack \ Shell \ KnownFolders \ KnownFolders.cs: Row 29 Microsoft.WindowsAPICodePack.Sample

visual c++ - DLL self-registration: how to register just for the current user? -

I'm using Visual C ++ I really only want to register DLL for the current user, even if User is an Administrator For this reason, I have changed all the project.rgs HKCR reference but, using the regsvr32 to register DLL Using the monitor, I think it still tries to create HKCR \ TypeLib \ {...} . This is done on CComModule :: RegisterServer () to call it. Is it the underlying of CComModule ? Do I miss something in the context of Visual C ++ configuration? I know I can use the RegOverridePredefKey , but I do not want to load more DLLs, and this is not a very elegant solution. CComModule :: RegisterServer () a BOOL The first parameter that indicates that it should register the type library. Set it to FALSE and it will not try.

http - Firewall / visited websites logger -

I have a firewall implementation and I want to log in to all the websites I saw on the machine. So when the user enters an address in the browser (any browser) or clicks on a link, then it may be able to log in at that address. The problem is that I just want to log in to the visited address and not the other resource requested by the page (ads, iframes, Google statistics and so on) is there a way to do this by looking at the HTTP or TCP header? Or any other method Thank you. A possible way would be to use "transparent proxy": the firewall will automatically use all the outbound Transfer HTTP connections. You will find the desired information in the proxy log.

freepascal - How to use TProcess to start ssh -

I need to create a graphic interface in Laser from which I run incorrect commands on 12 remote computer nodes. Some of these commands never come out / return (for example, I also start daemon). This graphic interface requires the separation of the user (beginner level) from Linux's heavy complexity. I intend to run the wrong equipment and script through SSH. I have tried to run SSH (passwordless) in TSPCS but it is not working. For this, I have tried the second, third and fourth Teaspoons examples posted on Laser's official web page (). 4 was "big output" - when the program generates more than 2KB output Anyway, the test program is not capturing output from freeze or SSH. Anyone successfully used TProcess to run both small and large output applications? PS: I am on Linux, nodes are also on Linux. Please also tell me if you have anything that is about doing this with Laser - maybe something that does not involve SSH and / or Teapraea, although I do not know w