Posts

Showing posts from April, 2011

objective c - In iOS where should objects be created if not in view controller -

I have a class (which receives data from NSNotificationCenter, processes it and sends it back to the NSNation Center ) That I start my app just once. I could have done it with a visual controller, but it seems weird because they are not related, so where are you right to create an object, which are not directly related to the UI, But living in the life of the application Should? You should keep things for which app delegate The app running in the H / M file must be alive for the entire life cycle.

How can I create a fixed size Gtk.TextView in Gtk+3? -

I have a GTKteviewview in which a GTK is fixed and I have set its width and height and rap mode. My problem is that I need to avoid expanding TextView, when the user joins more text than fit in the set size, in that case I have to stop the user from writing. Any help? If you have a line entry, instead of text, use textentry rather than textview Text entry You can set the maximum length of the textant. For the development of UI using Glade. Apart from this, if your UI change is based on the configuration file from the server, then it is also a solution, all windows are in the window, show / hide the widgets based on the config file from the server.

jquery - Is there a good way to deal with unobtrusive validation's seemingly asynchronous behavior? -

Image
I have a short verification code run when I submit a form. Contradictory recognition has been established for my form. ("{strict} use"; $ ("# feedbackForm"). Submit (function () {var t = $ (This) .serialize (); var val = $ (this) .validate (); console.log (val.errorList.length); return false;});}) (); When I hit a breakpoint in Chrome, I see the following behavior: You can see from the console that when the code was originally executed, it recognized 0 errors in the error list of verification, but when I got a breakpoint If I stop execution through, it recognizes 4 errors of verification error list is also with After the first time, is calculated correctly at the right number of runtime errors. How is this possible? How can I get the exact number of errors runtime? Edit 1: I can not reproduce this problem on jsfiddle, so something else should be run. Edit 2: I should also keep in mind that the setTimeout () within the submitler Using...

asp.net mvc 4 - Can't get ViewContext.RouteData.Values["Controller"] to work for me -

I'm doing something wrong, I know so much :) I'm trying to display a simple breadcrumb on one page I am I have it in a scene: @if (view context.RootData value ["action"]. Toaster () == "index") {& lt; Li & gt; // This "Mater" @ View Contex RootData displays value ["Controller"] & lt; / Li & gt; } Other {& lt; Li & gt; // It shows a hyperlink "Mater", //, but Href "MyApp / Matter / Matter" & lt; A href = "@ ViewContext.RouteData.Values ​​[" Controller "]. ToString ()" & gt; @ViewContax Root data Value ["controller"] & lt; / A & gt; & Lt; / Li & gt; } In the above scenario, I have my root C file set to be "MyApp / Matter" which corresponds to an "index" verb on "MeterController". When clicking on the link you are brought to "my app / mater / mater" which does not work. How can I work it out?...

sql - Truncate a table while preserving the auto increment ID in SQLite -

I have a SQLite database with many different tables I have one of these tables Delete data table data AUTO_INCREMENT = {value from first query} Is there a small / better method? Unless you have created your table from AUTOINCREMENT to the primary key set, Starting with 1 Please read more about AUTOINCREMENT in SQLite from here:

Get paypal user information after sale creation -

I am integrating PayPal in a shopping cart and want to get the user's shipping information after paying. I know that there was a way to use this old API, but it seems that the API has changed when the developer was started. Paypal.com. I do not know which URL I have to use to get information about extended donors. So far, I am sending the user to paypal and when the user comes back, I have a payer ID and a token. From the previous call, I have an execution link, but there is no details link. Do I need to force the user to enter shipping information before reaching PayPal? If that's the case, it just seems confusing that PayPal shows shipping information from my system and not mine. How can I get once from paying the shipping amount to the payer of the payment? Most traders use paypal instant payment notifications (ipn) to get payment details, including shipping address. Are there. It allows you to receive real-time information instead of pinging us instead of paying. Be...

javascript - CKEditor appears gray in internet explorer -

I visited many websites to find a solution. My editor works in almost every browser Internet Explorer. Space (Textera) is not visible to change the content in Internet Explorer, the rest editor is visible. Does anyone know the solution? I did not find it on the internet. Updating the editor is probably a solution, but it took me some time to configure it together with Ckfinders, so I'm afraid that cecfinders are not working after an update. The editor had worked a few months ago, but I did not work on the website for a few months. & lt; Textarea id = "textarea" name = 'text' class = 'editor' & gt; & Lt; / Textarea & gt; To show my editor. & lt; Script & gt; $ (Document) .ready (function () {$ ('textarea.editor'). Ckeditor (function () {/ * callback code * /}, {language: 'nl', ui collar: '# e9eaee', toolbar Startup Expanded: Incorrect, Toolbar: [[Name: [Tool: Item: ['Maximize', '...

linux - Error importing Zookeeper libzookeeper_mt.so.2 in python -

I have problems trying to import this. So the file in Python ... I have added it to my / etc / Bashrc and source 'to reload it ... no luck yet .. . LD_LIBRARY_PATH = $ LD_LIBRARY_PATH: / usr / local / bb file /usr/local/lib/lobzookeeper_mt.so.2 exists in the file "build / bdist.linux-x86_64 / egg / zoopipher", in line 7, in & lt; Module & gt; The file "build / bdist.linux-x86_64 / egg / zookeeper.py", in line 6, __bootstrap__ importError: libzookeeper_mt.so.2: can not open the shared object file: no such file or directory I do not know about what to do at this point, anyone knows what I am doing wrong? I am using the Santos 6 64bit also beeted. Trying to load a library, "no such file or directory" The library is trying to load, its dependence can not be found. Play ldd : ldd /path/to/your/library.so Do not find the word "did not find" To check whether this is the case.

mysql - phonegap external storage -

I am using phonegap to create iPhone and Android applications. I should be able to store a database on a database in my database, as well as I can use my websacet server. The app is running on local HTML and JavaScript files because I can go about doing this to run AJAX / website requests on external servers? Then let me change my comments in a reply. / P> You need a client-server architecture, where the client will be your all end devices. In this case the server must be a globally accessible user (somewhere Amazon Cloud, maybe?). Your device sends updates to the backend server, which is from your database, ajax calls will be stored on the server. All your other customers need to use AJAX from the same backend server periodically, and updates will be sent from your primary device.

python - Modify dict values inplace -

मैं एक dict के इनवेल्स में dict d = {'a': 2, 'b': 3} मैं फ़ंक्शन 2.0 से विभाजित करना चाहता हूँ डी = {'a': 1, 'b': 1.5} ऐसा करने का सबसे आसान तरीका क्या है? मैं पायथन 3 का उपयोग करता हूं। संपादित करें : एक-लाइनर अच्छा होगा 2 से विभाजित सिर्फ एक उदाहरण है, मुझे एक पैरामीटर होने के लिए फ़ंक्शन की आवश्यकता है। आप चाबी के माध्यम से लूप कर सकते हैं और उन्हें अपडेट कर सकते हैं: कुंजी के लिए, d.items () में मान: d [key] = value / 2

mysql - using BIT as INT for storage volume efficiency -

If I understand correctly, then BIT is extremely disk efficient for my case , I know that I have only three values ​​which I would like to do, like INT s: 1 , 2 ; 3 . Do I correct that code is different from b'00 ' 3 and b' 0 1 ? If I type INT values ​​to INSERT VALUE S and SELECT WHERE s, will the mails be automatically added to those questions as BIT s? enter in t (beet) values ​​(b'11 '); / * 3 = 2 ^ 1 + 2 ^ 0 * / Insert t (bits) value (b'10 '); Insert / * 2 = 2 ^ 1 * / T (beet) values ​​(b '1');

Mono for android - Android.OS and Android.Provider assemblies? -

I am using Mono for Andorra 4.6, I am trying to get information about the device. The samples I have seen are below, but I'm not sure what to add to get this reference? var device = Android.OS.Build.Device; // Type or namespace OS does not exist ... (unsupported failed?) Var id = Android.Provider.Settings.Secure.GetString (ContentResolver, Android.Provider.Settings.Secure.AndroidId); // Type or namespace 'provider' does not exist .. (unavailable assembly?) Try this way: using Android .OS; Using Android. the provider; Using Android. Content; Using Android. App; Var device = build.device; Var id = settings Safe. GetString (Application Content Content Resolver, Settings. Secure.Android Ed);

google app engine - Invalid syntax jinja2 template value -

max_height एक अमान्य सिंटैक्स त्रुटि क्यों करता है Main.py max_height = 70 template_values ​​= {'max_height': max_height # वाक्यरचना त्रुटि ...} अनुक्रमणिका .html & lt; html & gt; & LT; बॉडी & gt; {% व्यक्ति में व्यक्ति%} {% person.filter ("ऊंचाई & lt;", max_height%) & lt; b & gt; {{person.first_name}} & lt; / b & gt; & Lt; b & gt; {{person.last_name}} & lt; / b & gt; & Lt; b & gt; {{person.city}} & lt; / b & gt; & Lt; b & gt; {{person.birth_year}} & lt; / b & gt; & Lt; b & gt; {{person.height}} & lt; / b & gt; & LT; घंटा & gt; & lt; / घंटा & gt; {% Endif%} {% endfor%} & lt; / body & gt; & Lt; / html & gt; संपादित करें 1 यहां main.py से क्लास मेनपेज है: क्लास मेनपेज (webapp2.RequestHandler): def get ( स्वयं): people_query = Person.all () लोग = people_query.fetch (10) max_height = 70 template_values ​​= {'ल...

php - Insert array into multidimensional array -

I have an array that looks like this: { "calendar": { "date": "1", "event": "1", "description": "", "address": "laboratory"}} and I have a new array input I want to get this output in this array, but inside the calendar: {"calendar": {"date": "1", "event": "1" , "Code": "code": "code": "lab"} {"" "" "" 2 "," event ":" 2 "," description ":" "," code ":" laboratory "}} All of this is happening with a form post & lt ;? php $ Di_det = $ _get [ 'Di_det']; $ Di_ivent = $ _get [ 'Di_ivent']; $ Di_diskripshn = $ _get [ 'Di_diskripshn']; $ Di_kod = $ _get [ 'Di_kod'] ; $ Calendar = array ( "calendar" = & gt; array ( "Date" = & gt; $ dy_date, ...

getting specific elements from a list in Prolog -

I am reading this tutorial on Prol List, and how to get a specific element from the list, Came in: ? - [_, X, _, y | _] = [[], Dead (z), [2, [b, c]], [], z] x = dead (z) y = [] z = _ 9 9 What do I not understand, where do they get value 9 9 593 for variable Z? I am worried about the clarification of the Templar, although technical details are correct, I worry about getting the vocabulary. Okay. No one is being assigned here. The only integration is what we are calling here to do prologue, [_, X, _, y | _] with [[], dead (z), [2, [b, c]], [], z] . This is not a result Instead of imagining to move to the left side of Prol, and then when it can not be true, then these lists can be more secure in imagining . First of all, Prologue tries to unite together []. It is trivial, because _ means "I do not care" After this, try to unite X with the phrase dead (z) Does. It is trivially successful, because X was unbound, and it establishes a compulsive, x = dead (z) ...

upload - iOS in-app-purchase (IAP) hosting content with Apple -

I have an app that uses IAP and has been done through some versions. On the second day, I accidentally clicked the button to host content with Apple, and I found that I could not undo it. The worse thing is that I can not test IAP in the sandbox environment, I am uploading the content. I remember that a lucky boy posted here was saying that he has such a situation and Apple wrote the option after Apple removed the option for him. However, I do not have such luck, I wrote to Apple to request the removal of the flag and said. After waiting for 3 weeks and a handful of phone calls, I got an answer saying that the flagging hosting content option is not reversible. I think I have to go to the other side, but I have such steps and uncertainty, which I can do. 1, I am planning to upload a 1-line text file with IAP. Is this okay? 2, this is the first time I create a .pkg file. I downloaded the packagemaker, and removed the 1-line file in my window and I have created a PKG, which has fo...

Oracle: Get length of partial string match -

Imagine I have a table like name ---- ABCDEFG ABChello world I always ask a question from the beginning and find out how many letters of each string want to match the desired string "ABCDEFGHIJ,". This is the reason ... name is MatchingLength ---- ---- ABCDEFG 7 ABChello World 3 ABCDEzoo 5 ABbar 2 ABCDEF 6 ABCDEFGHIJKLMNOP 10 zzz 0 qABCD 0 ABCqqqGH 3 ABCABC 3 Is there any way to do this properly in Oracle? I'm getting hurt "clean" is not known, but here are two solutions. - Strict, poor performance though your strings have no change as pattern (substr selection ('ABCDEFGHIJ', 1, ROWNUM) with double txt level & lt; = Selection of length ('ABCDEFGHIJ')) d.txt, organized (maximum (length (p.txt)), 0) Dummy D, except pattern p on instr (d.txt, p.txt) = 2 by group d 1 group by .txt command; - A calm with reggae. However, changing your input string - like in previous examples, is more complex than the last, - as Oracle is usel...

iphone - Trigger an HTML button click through objective-c? -

My goal is to send an HTTP request to a web server, give it the username and password I found that part, and It worked surprisingly well. But, in fact, the click on the "login" button should be clicked on it completely stumped me ?? NSLog (@ "Start the connection"); NSURL * Login Page = [NSURL URLWithString: @ "www.A_WEBSITE.com"]; ASIFormDataRequest * Request = [ASIFormDataRequest request with url: login page]; [Request Security Mode: @ "Post"]; [Request setPostValue: @ "username": @ "ct100_plnMain_txtLogin"]; [Request setPostValue: @ "password" for: @ "ct100_plnMain_txtPassword"]; [Start request]; NSLog (@ "This worked"); [Requested Setded File Selector: @Selector (Attempt File);] [Request Setfinder Chooser: @Slector (Encryptused)]; NSError * Error = [Request Error]; If (! Error) {NSString * response = [requeststring request]; NSLog (@ "% @", response); } Other {NSLog (@ "%...

facebook - FB Login button not prompting first time users for scope -

Image
"div id = 'fb-root' & gt; & lt; / div & gt; & lt; स्क्रिप्ट & gt; विंडो .fbAsyncInit = function () {FB.init ({appId: 'ID', स्थिति: सच, कुकी: सच, xfbml: true}); एफबी.गेटलागिनस्टैटस (फ़ंक्शन (प्रतिक्रिया) {यदि (response.status === ' जुड़े हुए ') {यदि (response.authResponse! =' Undefined ') {window.location =' /fb_redirect.php ';}} और यदि (response.status ===' not_authorized ') {} अन्य {एफबी.इवेंट। सदस्यता लें ('auth.login', फ़ंक्शन (प्रतिक्रिया) {window.location = '/fb_redirect.php';}}}}}};}; (फ़ंक्शन (डी, एस, आईडी) {var js, fjs = d GetElementsByTagName (s) [0]; यदि (d.getElementById (id)) रिटर्न; जेएस = डी। सिकेट एलेमेंट (एस); js.id = id; js.src = '//connect.facebook.net/en_US/all .js # xfbml = 1 और amp; आईडीआईडी ​​= आईडी '; fjs.parentNode.insertBefore (js, fjs);} (दस्तावेज़,' स्क्रिप्ट ',' facebook-jssdk ')); & lt; / script & gt; & lt; div class =' एफबी ...

Javascript: matching a dynamic string against an array -

I'm trying to teach myself Javascript What I assumed was simple, but in relatively quick problems Attended I am trying to find the string for any other string given by the user. My code is so far: var source = "XREs2qqAQfjr6NZs6H5wkZdOES5mikexRkOPsj6grQiYNZfFoqXI4Nnc1iONKVrA"; Var searchString = []; // user input searchString = prompt ("enter search string"); Var hit = []; Var one = 0; Var two = 0; Var k = 0; Var source search = function (text) {for each letter of the source (i = 0; i & lt; source.length; i ++) {// if (source [i] === search string [0]) {// If a letter in the source matches the first element in the user input one = source.indexOf (i); // Confused from here (P = Search String. Langham; P & gt; 0; p--) {}}}}; SourceSearch (searchString); I thought: Check to see if the first loop gets a letter that matches the first letter of the user input If it matches, check to see if you match the X characters before the next X charact...

cmd - batch script for xcopy -

I am trying to create a simple batch script to copy a folder into another folder. Yes of IF% 1 == Goto notification XCOPY% 1D: \ CopyLoc / D / E / C / R / I / K / Y ECHO copied GOTO EXT: INFORM ECHO Usage: CUSTCP & lt; Source Directory & gt; : EXT I saved this file under Name custcp.cmd . When I say C: \ & gt; Custcp I get the message The syntax of the command is incorrect. But what do I need to do display USAGE: CUSTCP & lt; Source Directory & gt; Is there any other novel way of doing this? I also want to know if this command will work for folders in mapped network drives? PS: This is my first attempt at batch file creation. Since and & gt; There are redirection letters, the miracle of the batch where you want to redirect the text. A carat ( ^ ) to close the special meaning of the redirection characters directly, Use, as follows: echo usage: CUSTCP ^ & lt; Source directory ^ & gt;

design patterns - Differentiating between domain, model, and entity with respect to MVC -

Can anyone explain these 3 concepts and the difference between them in relation to an MVC framework with these examples? For me this looks almost equal, and it seems that they are used in some articles for each other and not in others. The words are a bit unclear. I will use the domain to reference the business area that you are working on. You do not have a domain model like banking or insurance or after that you have these things that you deal with in that business domain, such as banking, domain for you account, customer, transfer etc. Are there. I refer to the class unit POJO or the prevailing / concrete version of a model. Are you confused here that in the MVC word, model is a solid thing, but it is a web GUI to represent some presentation Refers to the data model used for it, so do not mix with the above explanations.

java - How to handle new line character while creating csv file in android -

I'm making a CSV file in Android. The file is being successfully created but if the content has a new line character then the content formatting is upset. Please suggest how to handle the new line character. If additional information can be made available, then how is the data received and processed, A more detailed example of fitting for can be provided. Let us see the C-S-V file. I recommend the 2-letter string "\ n", but you can clear it blank, dash, or even completely. When you are on it, you may also want to handle the line, punctured "\ r" and make sure to avoid the tab "\ t" backslash characters. Example (pseudo-code): stringbuffer s = new stringbuffer (); Four c; Loop-to-character {if (c == '\ n') {// "\ n" with new-line change s.append ("\\ n"); } Change the line-feed with Else if (c == '\ r') {// "\ r" S.append ("\\ r"); } Else if (c == '\ t') {// replace the t...

ruby on rails - routing error showing that No route matches [POST] "/admin/locations/1" -

When I edit my location, I'm new to ROR, it will give me the following error No [POST] "/ Admin / places / 1" Here I am using Rail 3.2.12 This is My Location Controller class admin :: Location controller & lt; ApplicationController def index @ location = location.order ("location desc") end DEF New @ location = location. Make new end DEIF @ location = location.NEW (PARAM [: location]) if @ location.save # flash [: notice ] = 'Successfully added to the location list.' Redirect_to: Action => 'Index' and render: action = & gt; 'New' end end def edit @location = location.find (params [: id]) end def update @location = location.find (params [: id]) if @ location.update_attributes (param [: location]) #flash [: Notice] = 'The category has been successfully updated.' Redirect_to: Action => 'Index' and render: action = & gt; 'Index' end and end this is my edit.html.erb & lt; H2 ...

c# - File Upload in each row of gridview -

I have a file upload control inside a gridview item template such as & gt; ; Item Theme & gt; & Lt; Asp: FileUpload id = "flUpload" runat = "server" /> & Lt; / ItemTemplate & gt; And I have a button outside the grid view that uploads and I want to upload all the files in grid view one by one. But my problem is that when I select some file in the file upload control, the upload button does not fire the click event. I know that there is no way, the click will work. Three templates columns in a gridview. Whether you have kept the FU in the constant or displayed the 'item' template. Move it over to edit or someone else (not on computer to see names). If your grid is inside an 'update panel' then FU control is not compatible with it. You should also consider creating a description view and put it there, when users select that row, then edit the upload whatever you need. Forget about my updated panel item, I saw that...

java - Creating a pointcut in Aspectj for each Junit test in a testsuite -

Halo Im bothered to integrate the aspect with aspect testing. I need to get a separate log for each test in a testuite so I need to know in my aspect when a new test case is going on and when it ends. How can I define such a point? The following point link is not working for me, it is only being entered once. pointcut testIsAboutToBegin (): execution (* *. Test (..)); How about using the advice around? Rating around point: Execution (Public Zero Test * (..)); Exposes around zero () Exception: ApproachST () {LOG.info ("Start"); getting ahead (); LOG.info ("stop"); }

razor - Bundling scripts are not getting rendered -

I am having problems with script bundling and minimization with ASP.NET, I try all the popular solutions found on the internet But still the same problem. Looks like my BundleConfig.cs name space MYPROJ {public class BundleConfig {public static void AddDefaultIgnorePatterns (IgnoreList ignoreList) {if (Ignore list == empty) return; IgnoreList.Ignore ("* intellisense.js."); IgnoreList.Ignore ("* - vsdoc.js"); Ignore list ("* .debug.js", optimization mode. When enabled); Ignore list ("*. Min.js", optimization mode. When disabled); Ignore list ("* .min.css", optimization mode. When disabled); } Public Static Zero Register Bundle (Bundle Collection Bundle) {Bundle. Unknown list Clear (); AddDefaultIgnorePatterns (bundles.IgnoreList); Add bundle (add new scriptbundle ("~ / bundle / jquery"). ("~ / Scripts / jquery- {version} .js")); One ?? | Â ?? |. //bundles.Add(new ScriptBundle ("~ / script") (...

arrays - BASH regex matching in if statement -

I would like to mention now that I am not overwhelmed with either RegEx or BASH, so a debrief explanation would be very appreciated. This way I can learn thanks. I have given this file a lot below, but basically what I want to do is take an array $ sqldatabases and see which variables have the @ symbol , Then check that specific variable to not include the @ sign, and finally run a mysqldump for that database; the code that I have happened with is currently If statement is lacking filtering forum @ I ([Sqlcount = 0; sqlcount & lt; $ {# sqldatab For ases [@]}; sqlcount ++) source config.sh sqldatabases = (bounty forum @ user donor) $ Sqldatabases [sqlcount] "= ~ * [@] *]] ; "Sqldatabases [sqlcount] = $ {sqldatabases [sqlcount] Sqlcount]} & gt; .backups / $ timedate / MySQL / $ {sqldatabases [sqlcount]} SQL Thank you again for your help, and try to explain every modification in depth. You have to use the $ {array [index]} syntax. And you do not ...

3d - Using depth buffer to make water edge soft -

Image
I want to make soft edge water. So I created a render target to keep the depth of the scene, and then I render the geometry of water. and water to the alpha = (visible dipeth - waterdepp) * scale Given the results of the chart given below, the edge of the water will be softened But it looks awkward like a ladder. So how to deal with it? Thanks a lot! I've been working on a similar issue recently. I use transparency to soften the edges To use the depth of water to determine the alpha value, I am between 0.75 F and 1.0 F Use HLSL and function to return ambiguity value: // color whatever your light equations can be float 3 color = (R, G, B); If (Seedet & lt; = 0.2f) sacrifice; Float opacity = depression (lube (0. F, 12 F, C dipeth), .75 F, 1. F); Return float 4 (color .x, opacity);

php - Getting wordpress custom post type metabox values in the array -

मैंने WordPress थीम में "पोर्टफोलियो" कस्टम पोस्ट प्रकार बनाया है। & lt; ? Php add_action ('init', 'पोर्टफोलियो'); फ़ंक्शन पोर्टफोलियो () {$ लेबल = सरणी ('नाम' = & gt; _x ('पोर्टफोलियो', 'पोस्ट प्रकार सामान्य नाम'), 'singular_name' = & gt; _x ('पोर्टफोलियो', 'पोस्ट प्रकार विलक्षण नाम'), 'Add_new' = & gt; _x ('नई जोड़ें', 'स्लाइड'), 'add_new_item' = & gt; __ ('नई स्लाइड जोड़ें'), 'edit_item' = & gt; __ ('प्रोजेक्ट संपादित करें'), 'new_item' = & Gt; __ ('नई परियोजना'), 'दृश्य_इटम' = & gt; __ ('प्रोजेक्ट देखें'), 'खोज_इटम' = & gt; __ ('खोज परियोजना'), 'नहीं_फाउंड' = & gt; __ ('कोई परियोजना नहीं पाया '),' not_found_in_trash '= & gt; __ (' ट्रैश में कोई प्रोजेक्ट नहीं मिला '),' parent_item_colon '= & gt;' '); $ का ...

c# - Data annotation to replace property's value? -

Is it possible to use the data annotation feature to create a new refine after manipulating and manipulating text? For example, I want to validate a string property to place multiple locations between special characters or words, then return a new string to change the value of the original asset. How likely is it to use data annotations? Conak's suggestion is the best way to do this. However, you can write your base class and use the reflection that you want with the contents of the members of the type.

python - Disable certain output nodes in PyBrain -

I am creating a simple feed-forward neural network in PyBrain to classify characters (26 short cases, 26 upper case and 10 numbers) There are two separate documents- one has only upper case letters and numbers and the other has lower letters, numbers as well as upper case letters. Will I have to create two different networks? Is the first document being processed when there is no way to disable the upper case node? If more documents (images of documents) are later integrated for the project, then there will be other combinations. It seems difficult for everyone to create new networks. Thanks in advance PS: Does anyone really know (really) good tutorials on PIBRN? I am making a beginning and the documentation only addresses really simple examples. You do not need two networks, one is very good for you to train these labels 62 The label (26 upper, 26 lower and 10 numbers) will be required and a larger data set would be you could create a data set using two documents. Ther...

sharepoint - Deploy a Page based on a Custom Layout in SP2010 -

Image
I am able to deploy a custom page layout successfully and see it in the masterpage gallery. I can also manually create a page from this layout. What I want to do, is automatically positioned with the package based on custom layout in my site definition. How do I deploy a page and tell the page to use the layout? You can create page examples by using the module / P> I think your page layout page is named Home.aspx , for example Home.aspx RootWebOnly = "false" & gt; & Lt; File Url = "YourModuleName / Home.aspx" type = "GhostableInLibrary" IgnoreIfAlreadyExists = "TRUE" & gt; & Lt; / File & gt; & Lt; / Module & gt; to: & lt; Module name = "custom page" url = "page" path = "" rootwb only = "incorrect" & gt; & Lt; File name = "Home.aspx" Url = "Home.aspx" type = "GhostableInLibrary" path = "...

r - How to replace a value in multiple columns based on criteria? -

I will assign all the values ​​to 99 with NA Change the record where art == '999' only in the column L1: L8 . I know how to do this for columns at a time, but I want to do it for all the columns in a command more efficiently. Sample data: df & lt; - Structure (list (KARTA = c ("02C2H", "02C2H", "02C2H", "02C2H", "02C2H", "02C2H", "02C2H", "02C2H", "02C2H", "02C2H", " 02C2H "," 02C7H "," 02C7H "," 02C7H "," 02C7H "," 02C7H "," 02C7H "," 02C7H "," 02C7H "," 02C7H "," 02C7H "," 02C7H "," 02C7H " , "02C7H", "02C7H"), YEAR = C (1997 L, 1999 L, 2000 L, 2001 L, 2002 L, 2003 L, 2005 L, 2006 L, 2007 L, 2008 L, 200 L, 2010 L , 2011 L, 1997 L, 1998 L, 2000 L, 2001 L, 2002 L, 2004 L, 2006 L, 2008 L, 200 L, 2010 L, 2011 L), A...

c# - get the value of a listview subitem -

I have the code in C # I have a list view, so I want the value of subitum in particular Sub-subtle submission should meet in which the sub-sum values ​​of the order are included. I want to add value and want to display as a result of the text box in the same form. How can I do that? Here is my code: AddOrderForm Add = New AddOrderForm (); Foreign currency (DataRow drow in dt.ows) {add.nametb.Text = drow ["menu"]. ToString (); Add.Pricetb.Text = drow ["MenuPrice"]. ToString (); Add.listBox1.Items.Add (drow ["MenuDesc"] ToString ().); Add.orderqtytb.Focus (); Add.ShowDialog (); } If (add.isAddOrder) {ListViewItem item = New ListViewItem (); Item.Text = add.nametb.Text; Item.SubItems.Add (add.orderqtytb.Text); Item.SubItems.Add (add.Pricetb.Text); Double total = 0; Try {Total = double.Parse (add.Pricetb.Text) * Double. Purse (add.orderqtytb.Text); } Hold {total = 0; } Items. SubItems.Add (total.ToString ("0.00")); Listview.Items.Add (item); ...

javascript - Mobile safari downsamples large images. How to retain? -

I have an HTML page with a 1675px 2640px image. I tried to see it in an iPad and apparently under the mobile safari images. We wanted to show a high quality image but Safari banned this. I am looking for a solution to keep the image size. I'm looking at it on Mobile Safari in iPad 3. People are suggesting using another browser but by default, we are using Mobile Safari. Are there any CSS, Javascript or other solutions for this restriction? I'm sure you are going to love this answer, but in a nutshell looks like this : "You can not get 1: 1 large size picture". A little more answer is that Apple intentionally forces things to work like this because the way this work was done was not to fully load the image before, or Accident. Now for a complete answer with the quote ... The point is, when the image gets decoded / decomproved, then compare the images There is a whole heck of more RAM space, the size of the file. Apple's formula is that a device...

html - Show defaulted text in a share button? -

I was wondering if it was possible to show some pre-defined text while pressing a tweet and google + button, I know that This is possible for Facebook but I can not find any useful code for the Google + button. The code for my Facebook share button (already working) is: & lt; A title = "Send to Facebook" href = "http://www.facebook.com/sharer.php?s=100&p[title]=EHBE Groningen and P [summary] = this http: //sharelink.comamp ; P [url] = www.example.nl and P [Images] [0] = example_image "target =" _ blank "& gt; Sharing is the text. & Lt; Period & gt; & Lt; Img width = "14" height = "14" src = "'symbol / fb.gif" alt = "facebook" /> Facebook & lt; / Span & gt; & Lt; / A & gt; The code for my currently tweet code (it also works) is: & lt; A href = "http://twitter.com/?post=tweet for txt" onclick = "javascript: _gaq.push (['_trackEvent...

pointers - pass by reference in assembly -

Using ARM-C inter-work, I am trying to write a program to calculate the number of exponentials I am I am using LPC 1769 (Cortex M3) for DBUugging. The following code is: / * Here is the main.c file * / #include & lt; Stdio.h & gt; #to & lt include, stdlib.h & gt; External int start (zero); Extension in Exponentcore (Int * M, Int * N); Zero print (int i); Int exponent (int * m, int * n); Int main () {start (); Return 0; } Int exponent (int * m, int * n) {if (* n == 0) returns 1; Else {int results; Results = Exponentiatecore (M, N); Return (results); }} Zero print (int i) {printf ("value =% d \ n", i); } This assembly code that meets the above c code .yntax integrated Cpu cortex-m3 Thumb .align .global start .global exponentcore Thumb Thumb_Funk start: mov r10, lr ldr r0, = label 1 ldr r1, = label2 bl exponentiate bl print mov lr, r10 mov pc, lr exponentiatecore: // r0- and m, r1- and n mov r9, lr ldr r4, [R0] ldr r2, [r1] loop: mul r4, r4 sub r2, #...

Error on ORACLE trigger -

I have this sexy trigger, which takes value from field referent, parse it, finds a row in some view And fills the need to insert some data in the original line. I also rewrite the referenced field and terminate the additional data. The legendary field looks like this: "-XXX-123", where is the key of 123 that I search for data in the scene. Hope this makes sense. Before triggering on triggered UTX, when each line is new in the new form, in the new form, to start or repeat Trigger TRI (new. STEVILKA_NAROCILA tap) DECLARE PARSED_STNAROC VARCHAR ( 255); PARSED_PRIMARY_VALUE VARCHAR (255); BEGIN PARSED_STNAROC: = SUBSTR (NEW.REFERENT, INSTR (new .REFERENT, '-', -1, 1) + 1); PARSED_PRIMARY_VALUE: = SUBSTR (NEW.REFERENT, 1, INSTR (new .REFERENT, '-', -1, 1) - 1); Select specific v.STNAROCILA, v.STNAROCILA, v.SIFKUPCA, v.STPONUDBE, PARSED_PRIMARY_VALUE: NEW.STEVILKA_NAROCILA,: NEW.DATUM_NAROCILA ,: NEW.SIFRA_KUPCA,: NEW.STEVILKA_PONUDBE,: NEW.REFERENT to ARH_...

ember.js route render: dom manipulation with setTimeout()? -

If I wanted to call a jquery plugin (for example, puts it in a table dom) after a scene, Is there a prospect in addition to doing this with window.Settimeout ()? This code works (1 mms timeout; strange;) root.Homereate = amber .Route.extend ({renderTemplate: function () {this. Render ("home"); // home view window .set timeout (function () ($ (".tables"). InsertTables (); // it must be added to a table}, 1);}}) But this code does not work: root.Homereate = amber.out.andend {{RenderTemplate: function () {this.render ( "Home"); // home view $ (".tables"). Insert (); // it will add a table}}); I know that there are Ember .View.didInsertElem Ent (), but so I have to set a callback on the parents' view, and just wondering why the above code example does not work as expected. Many thanks! I do not know my answer is 100% correct, but I think how it can be explained I think the problem is that, you think that the render ()...

java - Should we use clone or BeanUtils.copyProperties and why -

It looks - BeanUtils.copyProperties starts creating a clone of an object. If this is the case, And with concerns about implementing the clonable interface (only the new ones where there are references copied in computational objects), which is the best and why? I made the cloning yesterday and then realized that I had to provide my own modifications for the non string / primitive elements, then I got the BeanUtils.copyProperties , which I am now using. Both implementations provide similar functionality. Thanks Josh Block offers some quite good logic (provided by you Including one who made it) also said that the cloning is basically defective, rather than in favor of the copy constructor. See. I have not used any practical use yet to make an immutable copy. You are copying the objects for a specific reason, possibly for the processing, to exclude some set of items that can be transformed into a single transaction, can not guarantee anything unless the processing unit...

winforms - How to enable editing for new inserted row in a GridView while gridview is allowedit = false? -

I have a GridView control of the xtraGrid suite in a form when I open the form for the first time, this is AllowEdit = false . I want to press the new line link (built in control) to make the newly inserted row editable, then I have read that I should use an e-mailing event, but I do not know how I It's written but it does not make the row editable: Private Zero Grid Visibility Sender (Object Sender, System.ComponentModel.CancelEventArgs e) {// This is the first tryout // If (gridViewNote IsNewI TemRow (gridViewNote.FocusedRowHandle)) // == gridViewNote.GetFocusedDataRow ()) // {// gridColumnStagione.OptionsColumn.AllowEdit = true; //} // second tryout GridView View = GridView as sender; SchedeMaterialiDaTaglioDS.SMTAGL_NOTERow currentRow = gridViewNote.GetFocusedDataRow () as SchedeMaterialiDaTaglioDS.SMTAGL_NOTERow; SchedeMaterialiTaglioDS.SMTAGL_NOTEDataTable ChangeTableBase = DSTMTTagLio SMGL_Note GetChanges () as SchedeMaterialiDaTaglioDS.SMTAGL_NOTEDataTable; E.Cancel ...

excel - On Error Goto 0 not resetting error trapping -

I was under the impression that error on GoTo 0 reset error handling. So why is the error resuming not entering the following? Get Get Adobe Acrobat Reader (Get Adobe Flash Player): Get Adobe Flash Player (GoTo) on the WB = ThisWorkbook error: 'Get Err.Raise 69 Exit sub endbit: Get on error 0' & lt; & Lt; & Lt; Reset Error Handling? "Again irregular error" and "resumed" and subtitles after the column ("D: T"). Div class = "post-text" itemprop = "Text"> You need to use error on GoTo-1 or error cleaner to reset error trapping for. I check for a more detailed explanation a few months ago.

Android Fragments Button Click Open new Window for smart phone and Display the result right side in Tablet? -

I need to apply the piece to my requirement. When I click on a button, Need to display the scene in the other window and display the view for the tablet on the right side. If anyone has a sample project or tutorial, please provide it to me. Thanks in advance. For example, for a flexible UI using pieces, you can refer to this link:

asp.net - Database design & referential integrity -

Image
I am preparing a website UI (signup, signin, editing profile, editing address, etc.) I have created the following tables. My question is, are there any unnecessary columns or tables? In addition, which column would be the primary key and the foreign key to consider the fact that a user can add / edit another address? I am using three dropdown lists for country code (for mobile number) - CountryCode to newsletter , country (for address) - country name to annuity and state (for address) - StateName to Astaet . Of these, the country code comes on the dropdown signup page. The second 2 address book is on the page that is displayed after the user's login. AUser & amp; AUserAddress will store the table data. I do not know how I am involved in these tables. Do I include enough / more / fewer columns? What should I change? UPDATE1: I have updated the database in the following tables / columns. Now how do I establish a relation between the countryode and ...

How to use diff and patch in Cygwin on Windows? -

I follow several articles from there, but I still do not know how to use differences in patch and how to use patch original.txt one two three new.txt one four five Then I have the diff -u original.txt new.txt & gt; File.patch --- origin.txt 2013-03-21 15: 53: 20.062956800 +0700 +++ new.txt 2013-03-21 15 : 53: 29.191869600 +0700 @@ -13 +1.33@@ one-two-three. There is no new line at the end of the file + four + five \. No new line at the end of the file. Then I use patch origin.txt & lt; File.patch which shows errors patching file origin.txt failed in laugh # 1 1 of 1 laugh FAILED - saving the original.txt.rej file How to remove it? Is it related to Unix and Windows file formats? P / s : I have CYGWIN_NT-6.1-WOW64 and Windows 7 64bit P> This is almost certainly a line-ending problem, you can fix it by running dos2unix on the files first: $ dos2unix original .txt new.txt $ patch origin.txt & lt; File.patch patching file orig...

c# - HttpRequest.Files is empty when posting file through HttpClient -

सर्वर साइड: सार्वजनिक HttpResponseMessage पोस्ट ([FromUri] स्ट्रिंग machineName) {HttpResponseMessage परिणाम = नल; Var httpRequest = HttpContext.Current.Request; अगर (httpRequest.Files.Count & gt; 0 & amp; & amp; String.IsNullOrEmpty (machineName)!) ... क्लाइंट-साइड: public static void PostFile (स्ट्रिंग यूआरएल, स्ट्रिंग filePath) {अगर (String.IsNullOrWhiteSpace (यूआरएल) || String.IsNullOrWhiteSpace (filepath)) फेंक नई ArgumentNullException (); अगर (! फ़ाइल। उदाहरण (फ़ाइलपाठ)) नई फाइलनोटफ़ाउंड अपवाद फेंकें (); का उपयोग करते हुए (वर हैंडलर = नए HttpClientHandler {साख = नए NetworkCredential (AppData.UserName, AppData.Password, AppCore.Domain)}) का उपयोग करते हुए (वर ग्राहक = नई HttpClient (हैंडलर)) का उपयोग कर (वर सामग्री = नए MultipartFormDataContent ()) का उपयोग कर ( Var ms = नया मेमोरीस्ट्रीम (फ़ाइल। रीडएल्बेट्स (फ़ाइलपैथ))) {var fileContent = नया स्ट्रीम कॉन्टेंट (एमएस); FileContent.Headers.ContentDisposition = नई ContentDispositionHeaderValue ("अनुलग्नक...

SharePoint CAML query Orderby does not support descending attribute.? -

Trying to get data from the SharePoint list using the CAML query. Feeling deserving, do not do the desired work. Please find the code below. & lt; Order B & gt; & Lt; FieldRef name = 'id' Descending = 'True' / & gt; & Lt; / OrderBy & gt; The above code still receives the smallest ID (where the id is 1,2,3 ..), in my case this ID = 1 Thanks in advance. AFAIK, there is no "descending" attribute to specify a descending order. Instead, you have to use the ascending attribute, and "false" must be specified as values. & lt; OrderBy & gt; & Lt; FieldRef name = 'id' ascending = 'FALSE' /> & Lt; / OrderBy & gt; As you can see ascending - optional boolean specifies sort order on a FieldRef element Defined in a scene. The default value is TRUE.

python - alembic and getting the last inserted value -

I am using Alembic to manage my database structure. And the primary key ID column will be an autoincrement-column. How do I ask the data in the upgrade script, so I'm sure I got the correct ID (I know that this is 1 in this specific case)? I know how #creating table op.create_table ('srv_feed_return_type', sa.Column ('id', sa.Integer, primary_key = true), Sa.Column ('name', sa.String (50), null = false), bit column ('created', bit datetime, server_default = funny. Now (), faucet = incorrect), bit column ('created ('LAST_UPDATED', sa.DateTime, False = false), sa.Column ('last_updated_by', sa.String (50), faucet = false), ' For operation) # Table srv_feed_return_type = Table ('srv_feed_return_type', column ('name'), column ('created'), column ('created_by'), position ('LAST_UPDATED'), column ('last_updated_by')) #bulk insert op.bulk_insert (srv_feed_return_type, [{'n...

html - CSS Reset On Cross Browsers -

I have a webpage with some elements when I run the page on different browsers, the elements are positioned differently I want the elements of the same elements in all browsers (Chrome, Firefox, IE, Opera, Safari) to be the same. I am red to reset the CSS and reset the CSS file and I put the content from this page to reset the CSS configuration. Then I run the page and then it looks different in different browsers. What should I do to see the page in different browsers? CSS is not a reset, a magic wand which presents your page in the same form in different browsers. It would like to strip all the elements to the point where they work like a div or span, which is blind speaking creates the foundation on which the authors can create their own stylish ideas. So if the CSS you wrote does not have the same rendering in the browser, then it is not because CSS reset is not working. There are various reasons such as lack of support, bugs in the browser, or lack of support for various...

python - how to solve this deadlock with gevent and oursql -

मेरे पास एक जटिल परियोजना से निम्नलिखित कोड है: आयात आयात बंदर बंदर से Patch_all () import geost आयात oursql def रन (num): conn = oursql.connect (host = ...) कर्सर = conn.cursor () कर्सर। Execute ('शुरू लेनदेन') मैं श्रेणी में (2): प्रिंट Num, i कर्सर.एक्सिक्यूट ('UPDATE userobj SET टाइमस्टैम्प = (टाइमस्टैम्प + 1) WHERE id = 1') gevent.sleep () कर्सर.एक्सिक्यूट ('रोलबैक') proc = [gevent.spawn (run, i) i के लिए इंजन में InnoDB है और आउटपुट है: 0 0 1 0 फिर प्रोग्राम लटका हुआ है। मुझे पता है कि कारण है mysql पहली हरेलेट के बाद पंक्ति ताला अद्यतन कथन कार्यान्वित करता है, तो अन्य हरेलेट में अद्यतन ब्लॉक होगा। लेकिन गेट पर दूसरे एक ब्लॉक के बाद गैजेट अब पहले हरेलेट को वापस क्यों नियंत्रण नहीं लेते हैं? और मुझे आश्चर्य है कि इससे पहले कि gevent.sleep ? पीएस मूल स्थिति एक वेबसाइट परियोजना में है मैंने पमोंगो और एसक्यूएललेमी संचालन मिश्रित किया और साइट की सेवा के लिए गनटोर्न का इस्तेमाल किया। लेकिन मैंने पाया कि समानांतर अनुरोध हमेशा के लिए ब्लॉक कर सक...

on Android configuration changed Application is restarting -

I'm a newbie for Android development. I am writing an application and my requirement is when the orientation changes. , The application does not restart below is a sampling app tested in Samsung Galaxy II mobile. I am using 4.0.4 Android OS version, and my application has been developed under API level 8. android: configChanges = "orientation | keyboard | keyboardHidden" Android: configChanges = "orientation | keyboard" Android: configChanges = "orientation" Android: configChanges = "Keyboard | keyboardHidden" android: configChanges = "orientation | keyboardHidden" Please help me Increases the MainActivity activity of the public class {@Override Creates Public Void (Bundle Saved Instantstate) {Super.New (Saved Instantstate); SetContentView (R.layout.activity_main); Toast. Make text (getApplicationContext), "it is starting", toast.lnnhH_LOG). Show (); } @ Override Public Boolean On Crate Option Menu (menu me...

Error in Clojure java.lang.Exception: transaction rolled back: d != clojure.lang.Keyword (NO_SOURCE_FILE:0) -

यह मेरा कोड है: (defn tbl_email_data {: new-acc 1: email "Test_get_account_3@mode-test.co": टोकन "pa55P0rt"}) (बनायें-ऑनलाइन-परीक्षण-डेटा [डेटा_values] (के साथ-कनेक्शन (लेन-देन के साथ); सम्मिलित करें tbl_email (exec-sql (प्रारूप "में डालें Tbl_email (ईमेल, acc_no, pass) मान ('% s',% d, '% s') "data_values: ईमेल data_values: new-acc data_values: टोकन))))) इसे चलाने का प्रयास करते समय, मुझे निम्न त्रुटि मिलती है: com.mode.test.core.testOnline = & gt; (Create-online-test-data tbl_email_data) java.lang.Exception: लेनदेन वापस लुढ़का: d! = Clojure.lang.Keyword (NO_SOURCE_FILE: 0) आपका कॉल प्रारूप ऐसा नहीं कर रहा है जो आपको लगता है कि यह कर रहा है। आप मैप और कीवर्ड को तर्क के रूप में पारित कर रहे हैं, जिससे एसक्यूएल स्ट्रिंग (और अंतिम तीन तर्कों को अनदेखा कर) में स्ट्रिंग का प्रतिनिधित्व करने के लिए format का कारण होगा। इसके बजाय इसे आज़माएं: (प्रारूप "tbl_email में सम्मिलित करें (ईमेल, acc_no, pass) मान (...

get values from ruby to javascript -

Rail is new to Ruby. I want to get value from ruby ​​to java script. Here the code is using iam. What do I want to do that I want to create a data variable in Jason format which remains with speed and time values ​​from Ruby. Static values ​​are used above & lt; Table border = '1' = 'center' class = "table-table-striped" & gt; & Lt; TR & gt; & Lt; Th & gt; Id & lt; / Th & gt; & Lt; Th & gt; Speed ​​& lt; / Th & gt; & Lt; Th & gt; Time & lt; / Th & gt; & Lt; / TR & gt; & Lt;% @ properties.each do | C | & Gt%; & Lt; TR & gt; & Lt; Td> & Lt;% = c.device_id% & gt; & Lt; / Td> & Lt; Td> & Lt;% = c.speed% & gt; & Lt; / Td> & Lt; Td> & Lt;% = c.time% & gt; & Lt; / Td> & Lt; / TR & gt; & Lt;% end% & gt; & Lt; / Table & gt; & lt; P & gt; & Lt; Div align = 'center...