Posts

Showing posts from June, 2011

Opening a Unix executable with args on Mac Osx -

How do I open Unix executable on Mac OSX? I created a commandline application on Mac OSX and I want to pass some arguments while executing it from the terminal. But I am unable to open it from the terminal because it does not recognize it. What I can do is execute executable by double-clicking on it. Is there a way I can start it with arguments please help

imap - .NET how to retrieve list of emails from Gmail server with out third party -

I want to retrieve all my Gmail mails and show them in the .NET 4.5 WPF application. I do not want to pay for a third party DLL. Is there anything in the building? Available in .NET 4.5 or later versions? Note: I do not care about sending mail, all my requirements are to show [read / unread / new] mail in my app. To do this, you will not support the .NET Framework to use IMAP or POP3 protocols. You will need to use a 3rd party DLL - it is available for free or implement the protocol itself using C # - although I am not trying to provide the sample code for it, though. Also see which components are discussed, as well as answering specifically that no .NET framework is supported.

ant - Mozilla rhino not compiling -

I am trying to compile the 9c8bad6ec6d51a0abfb9f6e840e2dbec3e2fbcee of the Mozilla Rhino project to do some test on it. I have cloned the repository on my server, and have checked the hash. Then I compiled using ant, which returned errors of 128, 57 and 53 build.xml. I do not have 100% to ensure that the line 127 does: - & gt; So I have commented on it for the time being. For rows 53 and 57: & lt; Target name = "compile-src" depend = "ready" & gt; & Lt; Ant dir = "/ home / dario / testEnv / 181834 / prefix / rhino" /> & Lt; - line 53 & lt; / Target & gt; & Lt; Target name = "compile-toolsrc" dependent = "ready" & gt; & Lt; Ant dir = "/ home / dario / testEnv / 181834 / prefix / rhino" /> & Lt; - line 57 & lt; / Target & gt; They wanted to set the path to compile the path. They used to do something very dynamic primarily with some variables, but ...

php - impossible making javascript function and new row -

I am trying to create a function that adds a line but keypress T / I've been working with " , ' and it does not matter without it. When I press the button, nothing happens. / / Function Endand Lundy Count CounterLundy = 0; var $ newRow; $ (function () {$ ('# ad_lundi'). Click (function () {counterlundy = = 1; $ ('# Namlundi '). Append ($ NewRay) = $ (' & Lt ; Input id = "numlundi '+ counterlundi +'" name = "numlundi [] '+'" type = "text" onblur = "autre ();" onfocus = "enter ();" / & gt; ')) How do I? Here's the php & lt; td & gt; Lt; b & gt; Lundy & lt; / b & gt; & lt; / br & gt; & lt ;? php Echo $ date2? & Gt; & lt; div id = "lundicon" & gt; & lt; P id = "add_lundi" class = "plus"> gt; + & lt; / span & gt; & lt; / a & gt; "& Gt; Input In URL =...

Hibernate - Using Distinct Select query in Criteria -

Hope you're all right. Well I'm quite new to this stuff being in hibernation and I'm having difficulty finding a selection specific question to work. --------------------------------------- | User_id | User_name | User_type | --------------------------------------- | 1 | Mark Taylor | Administrator | | 2 | Bill Paxton. Coordinator | | 3 | Tony Brooke | Administrator | | 4 | Ali Jahan | Developer | --------------------------------------- I am hoping that the result is ending, admin, coordinator, developer What am I expecting as a return statement user - A list of types, the type of function I have written after searching for help is as follows: public list & lt; Users & gt; FindDistinctUserType () throws HibernateException {criteria c = this.createCriteria (); C.setProjection (Projections.distinct (Projections.property ("user_type")); Return (List & lt; User & gt;) (Users) c.uniqueResult (); } I have seen another example and hav...

c# - Excel file uploading works in Chrome, not working in IE 8. Error: 'could not find the part of the path' -

There may be a lot of useful links on the Internet Can not find part of the path , But I get that error only in IE The upload works well in Chrome . This problem is only on the server. : string path = path. Cobine (server.mappath ("~ / _Uploads / Temp"), uploaded file.filename); I'm sure the _lags and temporary are in the folder. Because I uploaded the file with Chrome, Strong> _ upload folder. I have found a link about IE security about this, but my settings do not have my computer tab Who was the same issue? How can this fix the problem? As always IE took my whole day and I made that issue Resolved in IE8 is a security option that does not allow the path of the uploaded file to be obtained. We need to set it to disable here: IE 8 -> Internet Options -> Security -> Local Internet -> Custom Level -> File on Server Include local directory paths while uploading. I have disabled it.

gephi - Set node weight -

I have a CSV list of nodes and edges, and load accordingly accordingly. My node list looks like this: ID date 56079348 12.07.2009 141 77150491 25.0 9.2009 2161 612473 08.01.2007 94 621523 10.01.2007 128 I Is this possible, and if so how? Yes, it is possible, what is the ranking panel. Keep in mind the numerical values ​​(float, integer, long ...), not text (string), import your "weight" values. It can be checked in the Import Wizard, when you are asked to confirm / select the type of each attribute. Once you make this check, go to the "wrapping" panel and click on "Apply" your weight attribute in the jeep drop down menu. There are some slides on this tutorial's ranking, and more.

AutoCompleteTextView android:dropDownSelector not working -

I am trying to customize a selector for my autocomplete view, so that when color Select changes I am implementing android: dropDownSelector . But this is not working and I get the default value .... aAdapterAutoComplete = New ArrayAdapter & LT; String & gt; (GetActivity () getApplicationContext (), R.layout.auto_complete_text, suggest.); AutoComplete.setAdapter (aAdapterAutoComplete); Layout: & lt; Android: layout_height = "match_parent" Android: dropDownSelector = "@ drawable / autocomplete_selector" android: signal = "@ String / type_here_to_search "Android: imeOptions =" ​​actionSearch "Android: textSize =" @ Dimen / text_size "& gt; & Lt; Requestfocus / & gt; & Lt; / AutoCompleteTextView & gt; auto_complete_text: & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Android = "http://schemas.android.com/apk/res/android" Android: layou...

jQuery with multiple radio groups, want only 1 group to have "yes" set rest change to "no" -

I need to create it, when a group is set to "yes" then the other group is "no" With the possibility of being set with load as well (not necessarily just one click () event I am unable to click on all the radio ( Which throws an error but submit) but can not know how to set the "0" value to others I can do things .. Changing / adding classes, changing the ID (although there is not a certain amount of values, it can be dynamically generated from DB between 1 and 10 (or more) addresses in the list) Here is the html, I can not change the "name" because I do not have the processing on it, only the html output (somehow more styling) Input Type =" Radius "Id =" primary-0-1 Name "value =" 1 "=" address [0] [primary] "/> Yes & lt; / Labels & gt; & Lt; Label class = "btn b tn primary active" & gt; Input type = "radio" id = "primary -0-0" value = "...

silverlight - C# How save a MemoryStream after a FileSavePicker -

I have an app called Windows Phone 8.1 Silverlight and I am using FileSavePicker but to save me a memory string Sample not found. This is my code after PickSaveFileAndContinue (); Thanks for some help! the public async zero release file open picture (File Alert Picture Continuation Event ARGR) {if "(ContinuousActionData [" Operation "] in the form of the string (= arguments") == "Update ProfileFile". ;! = Null) Using {var file = args.File; (IRandomAccessStream tileStream = await file.OpenAsync (FileAccessMode.ReadWrite)) {// GiveMyPhoto () is a method that returns to my MemoryStream (App. Current as App) .FilePickerContinuationArgs = null;}} Your var file In fact one Storage File File . Windows.Storage.FileIO namespace requires all. Example MemoryStream stream = GiveMyPhoto (); Wait for Windows storage_fileIORITBarAsICINC (file, stream.Gat windowRuntMbuffers (0, (stream));

python - Using a list in multiple Functions -

Is it possible to use a function in a function created in a separate function? I created a list of disks in this function: def create_discs (): disc_list = ['disc0', 'disc1', 'disk2'] I would like to use this list in a separate function def move_discs cmds.move (disc_list [1], 0, 0, 5) I get this error when I try to: name error: file & lt; Maya Console & gt; Line 48: The global name 'disk_list' is not defined # I am using Autodesk Maya If you do not want to use classes to keep the state, you may have a global variable or you can create_list () disk_list = [] def create_list (): global disc_list disk_list = ['disc0', 'Disk 1', 'disk2'] def move_discs cmds.move (disc_list [1], 0, 0, 5) Note that The use of global variables is not encouraged. Returning list create_list () from: def create_list (): ['disc0', 'disc1 ',' Disks 2 '] DEF LEV_DISK (): Disk_list ...

byte order mark - How to convert PostgreSQL escape bytea to hex bytea? -

I got to check a fixed BOM in the PostgreSQL text column. What I really want to do, should be something more normal, like something select decode (copy (text column, '\\', '\\\'), 'escape' ) From the table; The result of a UTF 8 BOM is: \ 357 \ 273 \ 277 Which of the physical bitea And can be converted by switching the output of bytes in pgadmin: update pg_settings set = setting = 'hex' where name = 'bytea_output'; Select '\ 357 \ 273 \ 277': Bitia : \ xefbbbf I What I would like to do is find results as a query, such as update pg_settings set setting = 'hex' where name = 'bytea_output'; Select the decode (change the text column, '\\', '\\\' ',' Escape ') from tableCYY; But this does not work, the result is empty, possibly because decode hex can not control the output. If the end objective is to get the textColumn Hexadecimal representation of bytes, it ca...

jsr223 - Scala 2.11 and jsr-223 not working -

I am very interested in using Scala script engine that we are now in Scala 2.11 I Notice that everything works within REPL, but if I do it by testing (I try with SBT and Maven) then the ScriptEngine is not found for the scale. I have tried to see which ScriptEngine is present println ("manager:" + manager.getEngineFactories.size ()) manager.getEngineFactories .toList.foreach (factory = & gt; println (factory.getClass.getSimpleName)) But I got the NationScriptEngine only (I have JDK 8) Does anyone have an idea why I could not find it? I had previously written problems with the NationalScript in SSBT which can be solved by the forks added in the test but this is not a problem here. It seems like the ScriptEngine is not present in the class when you are outside REPL Did you add REPL (and, maybe, compiler?) For class? I think that if you do not specify dependency and only bring the library, then it will definitely not work. If you do this, maybe you c...

java - Listening for changes in a MySQL Database that is accessed from a PHP web service -

Like my view is: I have a database that allows me to use JSON-RPC 2.0 Protocol I show the data of those tables on the desktop app, which is coded in Java, it's like an admin tool that is used to make changes (and even there is also an Android app that has this data Uses) to check for changes regularly And they need to show the user's Antim_apdet columns in tables. Data is stored on an array in the application How do I get a check for the last time? The simplest is to request a PHP service over your last reading time. You can then query for the last request for any TUP (entity) over the last_decimal time. For this, both applications need to make a request for changes (probably once per second) at intervals. On the other hand, a long-running PHP or C ++ task is to create a database that will continuously inquire the database and push the data out to support this through web-sockets. It can be difficult and you take part in problems quickly keeping "data in sync...

dotnetnuke - DNN5 account login module doesn't show the username and password label -

Hello every body, I have a very strange problem with the account login module using dotnetnuke 5.6 is. 8. I have to create a new web site, before I add localization for three languages, I have no problem with the account login module for two languages , But modifying the Netherlands (Belgian) does not show the module user name and password label. I added the old values ​​to the log in .ascx.resx files but nothing has changed :(! Here is the link to the problem (the text label is empty!): I use DN5 every day but this is the first time I have a problem ... Thanks for the help. / Div>

user interface - Java: time delay on a specific position - works in the wrong place -

I do not know that the title actually clarifies my problem. I am creating a card game application when users and computers Both of them have closed their card, till then they should remain on the screen in a definite way until the computer closes the next card. I tried try.Sleep () trying to solve this problem in the grip. And it is basically doing what it should have done but it is not what I want to do. The delay is not playing a card between the computer and the second second is off between the user button (for a card) and the on-screen appearance of this card. Here is the relevant code: Private Zero jButton1ActionPerformed (java.awt.event.ActionEvent evt) {jLabel1.setIcon (// new card icon); JPanel1.remove (jButton1); JLabel2.setIcon (// new card icon); If (// to prove that the computer has closed the highest amount) {disableButtons (); Sleep (); // Waiting for a certain time ... Playcard (); // Next Card Closes Down}} Public Nervous Sleep () {try {thread.Sleep (500); } Ho...

google app engine - How to catch BigQuery loading errors from an AppEngine pipeline -

I created a pipeline on the app engine that loads data from cloud storage to bigQuery. It works fine, unless there is an error. How can I load an exception by BigQuery from my AppEngine code? The code in the pipeline looks like this: # run the work credentials = app auspicious credentials (scope = scope)) Http = credentials.authorize (httplib2.Http )) Bigquery_service = build ("bigquery", "v2", http = http) jobCollection = bigquery_service.jobs () results = jobCollection.insert (projectId = PROJECT_ID, body = build_job_data (table_name, cloud_storage_files)) when receiving status (all No) Do not run and no runtime. IS_Shooting_Down (): Try: Job = JobCalysis.Gate (Project ID = PROJECT_ID, Job ID = DART Response) .execute () # Something from Job. 'Status'): exc_type, exc_value, exc_traceback = sys.exc_info () logging. Terror (traceback.format_exception (exc_type, exc_value, exc_traceback) time.sleep (30) This gives me status error, or major connect...

Grails Update a List in GSP (View) and then submit with a button -

Imagine that you have a table displaying a list of books (like indexes) and you make changes to columns Want to "sell" (for example a checkbox). So when you "examine" the books you sold, click a button to save you! How can I send that list back to the controller and update it? So, there is something like this in the controller: def aMethod () {... [bookInstanceList: myBookList]} In GSP: & lt; Each = "$ {bookInstanceList}" status = "i" var = "bookInstance" & gt; & Lt; Tr square = "$ {(i% 2) == 0? Even ':' weird '}" & gt; & Lt; TD & gt; & Lt; Six Link Action = "Show" id = "$ {bookInstance.id}" & gt; $ {FieldValue (bean: bookInstance, area: "author")} & lt; / G: Link & gt; & Lt; / Td> & Lt; Td> & Lt; G: checkbox name = "sold" value = "$ {bookInstance .. sold}" /> gt; & Lt; / Td> & Lt; ...

CSS removing border on tabbed navigation menu -

I am trying to create a simple tabbed navigation menu in CSS. I'm having trouble getting the bottom limit to go to the active tab. Usually it is not hard to do, but I also want to set a line height. That's why I use inline blocks with various IE and FF fixes. I am doing It displays the way I want it with the exception of the lower border. I have tried several ways to do this work, including the establishment of several operators .. but I do not have enough information about it CSS to determine me whether I use them correctly I am doing It's mine. (Obviously my CSS skills need to be working and I can probably also make the code a lot easier.) Code: #tab_menu {width: 100%; Hidden flurry; Color: # 000000; Border Bottom: #dddddd Solid 1px; } #tab_menu ul {padding: 0px; Margin: 0 px; } #tab_menu li {list-style: none; Line-height: 42 pixels; Padding-left: 15px; Padding-right: 15px; Font-size: 14px; Font-family: aerial, helvetica, sense-serif; Display: -Moz-inline-s...

firefox - How do I enable source map support in Firebug? -

I am using chrome for a good time now, and you have to explicitly enable sauce map support in the options . / P> I'm testing with some firebugs in Firefox, but I'm not seeing my original source files - just generate bundles. Is there some source support in Firebug? I am using Firebug 1.12.8 in Firefox 27.0.1. Firebug does not support source maps yet (as of 2.0. *) You may want to follow the source map support for javascript and css. Firebug 3 will be integrated into Firefox's built-in DevTools, which already has this feature. Firebug 3 will also have the same feature. Update : Firebug Firefox is merged with DevTools.

Less than Or Greater Than Comparison as a Variable in Python -

I have a block of code in the function, which compares something, that is: if customer_info ['total_dls'] & lt; Min_training_actions \ or customer_info ['percent'] & gt; Train_perc_cutoff: test_set \ or test_set [customer_id] ['total_dls'] & lt; Min_testing_actions: num_uncertain + = 1 elif test_set [customer_id] ['percent'] & lt; = Test_perc_cutoff: num_correct + = 1 other: num_incorrect = = 1 Continue Again, sometimes I compared them to more than that comparison, and sometimes I compared them to All other code is exactly the same. Now, I can only create two functions that basically reuse the same code, but before I do, the comparative operator has a clean way to create variables, so I only have one block code Can I use and pass as a variable in comparison? Something like this: Compare (var1, var2, polarity) . I know that I can make it myself, but I'm wondering what is the standard in such cases. Are there some dragon way...

Pause game on orientation change, objective-c / Sprite Kit -

I want to pause my game when device orientation is started. I have this method in my ViewController, which works fine: - (zero) willRotateToInterfaceOrientation: (UIInterfaceOrientation) toInterfaceOrientation Duration: (NSTimeInterval) Period {NSLog (@, I started rotating "Stop game should stop .."); } But how to hear from within my SKScene for the device rotation, where the actual game is playing. Hope I have made myself very clear thanks for any help! NSNotification you can use. Keeping with your code, add the following line to your ViewController init: [[NSNotificationCenter defaultCenter] postNotificationName: @ "RotateNotification" item: auto]; Then add this line to your SKScene init: [[NSNotificationCenter defaultCenter] addObserver: auto selector: @selector (receiveNotification) Name: @ "Rotate Notification "object: zero]; Also add the method called for SKScene: - (zero) receiveNotification: (NSNotification *) Infor...

java - WebView In Kitkat (4.4) Opens In a New Broswer Window -

Image
Before I upgraded to 4.3 Android 4.4 Android tablet, I successfully loaded the web view to login with Google To indicate a user (Using OAuth 2.0) and whenever they click on the login button, they were redirected from the Allow Access window from where they were allowed or rejected Could click on All these did not happen without opening a new browser window Upgrading, when I load the webview, this is what I see (which is still fine). Consent instead of a user After redirecting to the screen, after entering their credentials, they see this new web browser (chrome) window: As you can see, this is a regular browser window, as opposed to the first! The interesting thing here is that it works fine in 4.3, but in 4.4 it is not! Anyone have any suggestions on how to fix this issue? Thank you in advance! edit some code public class MyWebViewClient extends WebViewClient {@Override Public Boolean shouldOverrideUrlLoading (WebView to see, string URL) {if (Uri.parse ....

android - Last ADT update (22.6.3) spoiled my Eclipse -

I'm using mavenized library project with the following plugin: & lt ; Plugin & gt; & Lt; Group & gt; Com.jayway.maven.plugins.android.generation2 & lt; / Group & gt; & Lt; ArtifactId & gt; Android-maven-plugin & lt; / ArtifactId> & Lt; Version & gt; 3.6.0 & lt; / Edition & gt; & Lt; Extensions & gt; True & lt; / Extensions & gt; & Lt; Configuration & gt; & Lt; NativeLibrariesDirectory & gt; Ignored & lt; / NativeLibrariesDirectory & gt; & Lt; AttachSources & gt; True & lt; / AttachSources & gt; & Lt; / Configuration & gt; & Lt; / Plugin & gt; But after the last update of ADT (22.6.3), everything went wrong, Jar is not manufactured by Eclipse, and I found an error message of lyfecicle like this: Description resource path type type conflicting life cycle mapping (plugin execution "com.jayway.maven.plugins.android.generation2: android-Maven-p...

spring - How to define @Value as optional -

मेरे पास स्प्रिंग बीन में निम्नलिखित हैं: @Value ("$ {myValue } ") निजी स्ट्रिंग मान; मान सही ढंग से इंजेक्शन है। हालांकि, वैरिएबल को वैकल्पिक होने की आवश्यकता है, इसे कमांड लाइन पैरामीटर के रूप में पारित किया जाता है (जो फिर SimpleCommandLinePropertySource का उपयोग करके वसंत संदर्भ में जोड़ा जाता है), और यह तर्क हमेशा मौजूद नहीं होगा। मैंने एक डिफ़ॉल्ट मान प्रदान करने के लिए निम्न दोनों प्रयास किए हैं: @Value ("$ {myValue:}") @ वेल ("$ {myValue: DEFAULT}" ) लेकिन प्रत्येक मामले में, बृहदान्त्र के बाद डिफ़ॉल्ट तर्क तब भी इंजेक्शन होता है जब वास्तविक मान होता है - यह प्रकट होता है कि क्या स्प्रिंग को अंतःक्षेपित करना चाहिए। क्या है निर्दिष्ट करने का सही तरीका @ वेल की आवश्यकता नहीं है? धन्यवाद यह निर्दिष्ट करने का सही तरीका क्या है कि @ वैल्यू की आवश्यकता नहीं है? इस धारणा पर कार्य करना कि 'आवश्यक नहीं' से आपका मतलब है null तब ... आपने सही तरीके से नोट किया है कि आप : के दाईं ओर एक डिफ़ॉल्ट मान प्रदान कर सकते ...

php - MySQL query not working with nested select -

The code below does not work, I'm not a specialist with MySQL but it seems that it should work, someone Also clues? ($ Params ['action'] == 'createTab') {$ stmt = $ dbh- & gt; Ready (enter "dashboard_data (status, user_id) values ​​(maximum select (position) + 1 dashboard_data where user_id =: userid) ,: userid);); $ Stmt- & gt; Baidam Parm (': UserId', $ User ID); $ Stmt- & gt; Executed (); use dashboard_data (status, user_id) ) Select maximum (status) + 1: userid from userid where user_id =: userid

How do I test if a word is in a text file and append it to the file if it isn't in C++? -

I am writing a nutritionist program in C ++ and I want to test whether the user has entered Within one of the food, text files for each of the five food groups, if so, increase the value of "servings (food group)", but if not, then it will ask which food group is of food And adds it to the same text file. How should I go about this? I did something like this in Python, where I read the text file in an array. Will this also work? Yes it will! Then you load the array stringstream in stringstream ss (std :: string (/ * array, length * /)); Four meals [256] = {0}; While (true) {SS & gt; & Gt; food; If (0 == strcmp (food, "burger")) // // got food! }} or you can do it through ifstream but remember that RAM is faster than HDD

Apache/PHP mod_security: session hijacking false positive with session_start() -

I'm using it for it seems to be a false positive ... Index.php if (session_id () == '') session_start (); main request accept text / html, application / xhtml + xml, application / xml; Q = 0.9, * /*;q=0.8 Connection Keep-alive Cookie PHPSESSID = o2aaf0uti8pmah63t92ssvkqv0 Host www.test.com User-Agent Mozilla / 5.0 (Windows NT 6.0, RV: 28.0) Lizard / 20,100,101 Firefox / 28.0 error.log [Mon Apr 20 20: 11: 37.346379 2014] [: Error] [pid 5312: 1700 ] [Client 127.0.0.1] Mode Security: Entry is denied by 403 code (step 1). Operator matched in the EQ1 session: IS_NEW [file "C: /apache/conf/crs/optional_rules/modsecurity_crs_16_session_hijacking.conf"] [line "24"] [id "981,054"] [host name "www.test.com" ] [Message "Invalid SessionID submission."] [Uri "/"] [unique_id "U16Z2cCoAQkAABTAnDUAAACV"] modsecurity_crs_16_session_hijacking.conf SecRule REQUEST_COOKIES: '/ (J.D. (ID...

css - Positioning Elements without Absolute Positioning -

I have 3 columns, using the Bootstrap 3 grid system, the amount of text in each column is different and one below it The button has. I want to align 3 buttons vertically, but I can not use the position: absolute and below: x because it breaks the responsive nature of the grid. You can see examples here: Any ideas? You can set the height of the top block of each column I have created this card

html - PHP - Setting a specific $variable to NULL -

So if I have this code in PHP: $ class_name; And I want to put it in my markup like this: ... In this case how can I declare as variable? Which of the following is the best: $ class_name; $ Class_name = ""; $ Class_name = NULL; Edit: I am using HTML code in an external HTML file for one of my HTML files (I use the requirement ). Therefore, the first php file should be class = "wrap" in the div.wrap and other file has its class = "wrap red" . $ class_name = ""; If you intend to use it regularly in string context, the following things are considered empty: (with an empty string) Test with empty () . / Em> 0 (0 as an integer) 0.0 (0 as a float) "0" (0 string False Array () (an empty array) $ var; (a variable declared, but without any value) come For example, in your update, there is no trailing white space after class = "wrap" , but class = " Wrap red ...

html - JQuery drop down select value in another dropdown -

I have two selected boxes in my code, and I want to select the first box so that we can choose the default selection for the second box. What has been selected in the first. This code is working by leaving the reality in view of the price tags in the first selection. I want to see the value in the default tag. For example, if the computer class is selected, then I want the second selection box to immediately select "adult". Here you can see full HTML and JQuery code on JSfield: This is my JQuery script: $ (function () {$ ('Select #type') Val ($ (this) .val ())})}) $ (function () {$ ('select # type'). Change (function () {var defaultVal = $ (this). (": Selected " ) .rrr ('default'); $ ('select # age group'). Val (defaultVal);});})

matlab - Convert a matrix to a vector using a spiral path -

I have seen so far that when one wants to use the elements of a matrix one after the other, then they are always It starts by using an MXM matrix, going outwards and slowly towards the center, how we do the opposite, starting from a random point inside the matrix, and a "spiraling" to read all the elements Using the path. I am testing using matlab. Example. mat = 1 2 3 4 5 6 7 8 9 If you say we want to start with mat (3,1) clock If we increase our direction then we will have vec = 7, 8, 4, 5, 6, 9, 1, 2, 3 and if We start with mat (2,2) then vec = 5, 6, 9, 8, 7, 4, 1, 2, 3 A possible approach: mat = [1 2 3; 4 5 6; 7 8 9]; M = length (mat); Assuming the mat is always MXM R = 3; C = 1; Temp = Spiral (2 * M-1); Temporary = Temporary (M - R + 1: End - R + 1, M - C + 1: End - C + 1); [~, Idx] = sort (temp (:)); Vec = mat (idx). Results running with r = 3 and C = 1 vec = 7 8 4 5 6 9 2 2 Results r = 2 and c = 2 VCK = 5 6 9 8 7 4 1 2 3...

java - Android: managing bitmap memory when scaling is not an option -

I know about OutOfMemoryError hell which works with bitmap, may contain image-heavy applications is. Generally, I always work around it using caching, adapting images by adaptive, etc. However, currently I work on an app where a usage case has the ability to take an image and it has been automatically disliked with each other. Small image specification indisputably states that Branded image should have the same size and quality as the original size, so I'm not able to scale. I have found it impossible to apply already: Attempting to create a bitmap always uses OOME for testing, even with the same dimensions as the original image, even if Android: Large Hype = "True" is set. Is there any possibility to get around this all? The relevant code is: Private bitmap merge images (bitmap first image, bitmap second image) {bitmap. Config Config = (First Image. SyncFig!) = Faucet)? FirstImage.getConfig (): Bitmap.source. ARGB_8888; Bitmap result only = bitmap.credbi...

python - How to verify that a string has characters belonging to an alphabet? -

मैं इस कोड है: वर्णमाला = string.ascii_uppercase + string.digits + ' _ 'डीईएफ़ is_correct (mystr): # जांच अगर mystr में पात्रों वर्णमाला # संबंधित लौट सही है या गलत मुझे क्या होता है: mystr की वर्णमाला प्राप्त करें: alphabet1 देखें कि क्या alphabet1 लेकिन मैं के सभी पात्रों पर कैसे करना है पता नहीं 1) किसी दिए गए स्ट्रिंग के वर्णमाला कैसे प्राप्त करें? और यह कैसे पता चलेगा कि यदि alphabet1 में है ALPHABET ? वर्णमाला = string.ascii_uppercase + string.digits + '_' डीईएफ़ is_correct (mystr): वापसी सेट (mystr) .issubset (सेट (वर्ण)) या def is_correct (mystr): सभी को वापस (mystr में c के लिए ALPHABET में) OR def Mystr: char में mystr के लिए: if char नहीं में ALPHABET: return False return True OR def is_correct (mystr): mystr = ALPHABET में चार के लिए सेट (mystr): mystr.discard (char) वापस नहीं mystr

linux - Why does "su - -c" make this fail? -

यह असफल क्यों है? ~ $ su - - "कश्मीर = 0; यदि ls | grep -q ^ डेस्कटॉप; फिर k = 1; fi; यदि [$ k == 1]; फिर एको 1; फाई "पासवर्ड: -बाश: लाइन 0: [: ==: एक ऑपरेटर की अपेक्षित यह su - - भाग के बिना काम करता है। अपडेट यह एक सरलीकृत उदाहरण, मुझे वास्तव में क्या चाहिए था ssh -t $ host 'su - -c "k = 0; अगर yum चेक-अद्यतन | grep -q ^ kernel-; फिर k = 1 ;; Yum -y अपडेट; अगर [\ $ k == 1]; फिर रिबूट; फाई '' जो अब मदद के लिए धन्यवाद करता है, मैं यहां आया हूं। ऐसा इसलिए है क्योंकि आपके खोल एक चर विस्तार (क्योंकि आप डबल उद्धरण का उपयोग कर रहे हैं) करेंगे, और बहुत ही संभावना कश्मीर कुछ भी नहीं है क्योंकि यह सेट नहीं है। कृपया इसके बजाय विचार करें: सु - - "कश्मीर = 0; यदि ls | grep -q ^ डेस्कटॉप; फिर k = 1; fi; यदि [\ $ k == 1]; फिर प्रतिध्वन 1; फाई "(बचने वाले डॉलर के साथ) या: सु - - 'कश्मीर = 0; अगर एलएस | Grep -q ^ डेस्कटॉप; तो कश्मीर = 1; फाई; अगर [$ k == 1]; फिर 1 गूंज; फाई ' एकल अवतरणों के साथ जो चर विस्तार को रोके...

C++ Reference vs Pointer best practices -

I have read several stack overflow answers about this and I am not very satisfied with the responses so that I want to collect them here . When using the non-primitive and complex objects for parameters, it is generally advisable to pass them by reference when calling the function, there is no possibility of the parameter being used. This is mostly due to the fact that the references are guaranteed to assume value so that you do not know whether the parameter reference is taped or not. When the return value of the function is a non-primitive and complex object you should usually withdraw a pointer because it is easy to confuse the function, which returns a return with that reference, which Gives a value when they look alike. For example, take this class structure rectangle {int x, y; Integer width, height; Rectangle (int x_, int y_, int width_, int height_): x (x_), y (y_), width (width_), height (height_) {}}; Class image {public: image (): dimension (0, 0, 0, 0) {} ~ ima...

java - Spring - 405 Http method DELETE is not supported by this URL -

OK, I have a strange problem with performing a "default" HTTP request in Spring. I have a controlling method in which I mapped a DELETE request: @RequestMapping (value = "/ {authorizationUrl}", method = DELETE) public Zero deletion authority server (@RequestHeader) (value = "authorization") thrust authorization, @ PathWarible ("Authorization URL") string authorization URL) IOException {System.out.println ("test") throws; } The controller is mapped using @RequestMapping ("/ authorization_servers"); When I send a request through my DEV HTTP client, I get the answer: 405 Http method DELETE is not supported by this URL . The request looks like this: Delete localhost: 8080 / authorization_servers / asxas Header: Authorization: "Test: " If someone can consider it and can help me, I would be grateful This will work: @RequestMapping (value = "/ {authorizationUrl}", method = DELETE) ...

javascript - Changing iframe lengths by clicking on a link -

I am very new to javascript and this can be a dumb question, working on a school website, But an IFrame must be small / long. Say that I have a navbar on top with an iframe. Would it be possible to add one of these links, such as function iframeLength () {frame.obj.length = 200; } I tested this code, it works like a magic thing is, I do not know if i , because I need something based on the length of the IFRAME. Thank you, Michael I think this is what you want : & lt; A href = "#" onclick = "return iframe lang ();" & Gt; Do it! & Lt; / A & gt;

ember.js - Dynamic Navigation Bar in Ember -

I have an amber app where I'm trying a navigation bar to change the navigation items for different routes It helps. Initially, I got the navigation on the application model using the lazy loaded navItems property. But, now my first path is where navItems no longer shows the need to populate the navigation bar item. Now, I am using such a render assistant: {{render 'nav_menu' navItems}} From there, I have the NaviMenu template: & lt ; A href = "#" & gt; Go to category & lt; / A & gt; & Lt; Div class = "dropdown" & gt; & Lt; Ul & gt; {{# Ish}} & lt; Li & gt; & Lt; A href = "#" class = "skip" {{bind-et-goat-gooto-getto salg}} dirty offset = "- 120" & gt; {{Name}} & lt; / A & gt; & Lt; / Li & gt; {{/ Every}} & lt; / Ul & gt; & Lt; / Div & gt; And the scene looks like this: class extends the App.NavMenuView amber. Tags: ...

jquery - Data binding in javascript -

I am trying to implement a simple notification system for a private project, but to tie events in the information I got stuck The things that I get till now are created dynamically. / * Notification Reference * / Var Notifications = []; // Notification Item var Notification = Action (travelInfo) {this.el = $ ('# notifications_container'); This.id = Math.random (). ToString () Substring (7); This.travelInfo = travelInfo; This.read = false; }; Notification.protipip.en = function () {this.addOne (); This.render (); This.bindFunctions (); } / * Dynamically generated * / for (var i = 0; i This object is required to render each notification independently to track and pair the events that are actually presented: / / Render the notification of Notification Notification. Protopp.render = function () {var source = $ ('# info-template'). Html (); Var template = handlabs.com (source); Var data = this.travelInfo; Results = Templates (data); $ ('# Notifications_con...

sql server - SQL join multiple tables - result set not expected -

I am working in SQL Server 2008. I have 4 tables that I want. Give us A, B, C, and D. B, C, and D all subsets of Table A are called. There are some records that are common in B, C, and D. My goal is to select all records that are not in B, C, or D. So, I think that is the right query to run: Select one from Ax at the x less than X = = add on the DO on left x = = () and ( The problem I have is that I know there are some records in Table B which in this result set Those who are returning should not be there. (It can hold tables for C and D with the same.) So, some should be wrong in my query. My best estimate is that the matches are unclear. The first one should give me all records in A which are not in B Similarly, the second should give me all records in A which are not in C Because I have used it in the WHERE section and I must return only to the records which are common to everyone, but something is going wrong, how can I fix it? Try it: Select one of SELECT x Select f...

c# - Conditionally Enable Button on TreeNode focus -

Image
मेरे पास निम्न TreeView संरचना है: मैं बटन 1 बटन (" डाउनलोड फ़ाइल ") को सक्षम करना चाहता हूं, केवल जब Scan_XX या File_XX पदानुक्रम में स्तर चयनित हैं। अपने कोड के लिए AfterSelect ईवेंट एक अच्छी जगह है। यदि आप केवल नोड के पाठ से चिंतित हैं, तो इस छोटे से छोटे कोड के बारे में कैसे: निजी शून्य पेड़दृश्य 1_अफ़र चुनें (ऑब्जेक्ट प्रेषक, ट्री वीवएवेंटएरग्स ई) {button1.Enabled = ( E.Node.Text.StartsWith ("Scan_") || ई। नोडटेक्स्ट.स्टर्ट्स ("फाइल_")); }

Control CSS via JavaScript or jQuery -

I am looking for a way to control CSS for a particular item on hover. Since this is not a straight element in the original element, I can not use CSS. & lt; Article class = "portfolio-item web" & gt; & Lt; A data-rel = "prettyPhoto" href = "http://vimeo.com/34266952" & gt; & Lt; Img src = "http: //localhost/wordpress/wp-content/themes/dewuske/images/portfolio/introspection.jpg" alt = "" & gt; & Lt; Span class = "generic beacon isotope" & gt; & Lt; Span class = "bacon continent" & gt; & Lt; Span class = "beaconbar" & gt; & Lt; / Span & gt; & Lt; Span class = "biconcratch 1" & gt; & Lt; / Span & gt; & Lt; Span class = "beaconCircle2" & gt; & Lt; / Span & gt; & Lt; Span class = "beacontext" & gt; Introspection & lt; / Span & gt; & Lt; / Span & gt; & Lt; / Span...

c# - Building half a sphere, I get a hole at the tip. How do I set the triangles? -

I am creating a dome and it's great, it's just that I do not know that from the last corner How to connect When setting the triangle, the corners at the top run like this: for (int i = 0; i and triangle setup: for (int i = 0; i Once again, the very top head is not connected with its neighbors, I get a hole on the tip. The triangle was not visible at the very top, I was getting a hole at the top. I decided to manually add a head, in the middle, and add it to my neighbors. Anyways, thanks!

From table to array jquery objects -

I am trying to collect values ​​of custom data attributes using each . Even I have so far that JQ / JS var multi = $ ( '._____________' Var myarray = []; $ .each (multi, function (index, item) {myarray.push ({name: 'ticket_row_num', value: $ (item). Data ('ticket_OR_num')}); Myarray.push ({name: 'itemtitle', value: $ (item) .data ('item title')}) myarray.push ({name: 'row_quantity', value: $ (item). Data ('row_quantity 'Myarray.push' ({name: 'Rowunitprice', Value: $ (item) .data ('queue')}) myarray.push ({name: 'row_total', value: $ (item) Data ('row_total')}) // myarray.push ({name: 'measure_type_is_grams', value: $ (item). Data (' measure_type_is_g Rams')}}}}; myArray; The issue is that I am coming back to [object, object] and I do not know Why I am very unfamiliar with the arrays in JS / JQ and I am trying not to do it for greater profit. That's b...

skphysicsbody - Sprite Kit - Shadow on multiple moving object affected impulse and Gravity -

The base of my first question on which was answered (more was explained in the solution commentary and acted like magic) (This can be a simple answer, but I can leave it or anyone with it). What if I had another object in a different motion In the Y-axis witch stopped the moving ball already? How can I change the alpha of my shadow on the ball. To explain it well and make it more confusing, suppose we have a ping pong racket going up and down and a ping pong ball is bouncing. With the formula given earlier, we now know how to make alpha of ping pong racket (first ball) on the ground but what about the shadow of ping pong ball on the racket? How can we change our ambiguity on the racket? Will it be as simple as both rockets using the same formula on a ball :)? It can be used as a class and can be used here and here many times and how do you update it as it takes place in the update? Here is the code that I have applied with the formula of this aggregate. - (zero) update: ...

Histogram with Frequency and Density axises simultaneously in R -

Image
I can add both density and frequency plots like this hist (ex, Col = "red", prob = TRUE) lines (density (ex), col = "red") But is it even possible that both the letters on each side can also happen? Just an example: Updated: Solution genuine Depending on the data: # margin from the correct equals (Mar = C (5, 4, 4, 4) + 0.1) Hist (east, col = "red", prob = true ) Line (density (ex), col = "red") # axis axis ticks (4, at = seq (0,0.4,0.1) * 50, label = seq (0,0.4,0.1) * 2500) # axis Label Mtext ("Frequency", Side = 4, Line = 3) Your comment Two: Depending on your code, use Base R - here There is a quick walk on a formula - where you do not have to manually define the axes. The obvious difficulty is either density or the frequency will not be pretty / round number (if you want them to be rounded then the ticks can be used in different places will be on). I think it is more sensible for the density at defined inte...

c# - Navigate with object -

According to this, navigation all. Navigate methods should be an overload to increase the object, in Visual Studio 2013, and more. 4.5.1 If installed, the IDE can not be overloaded and it forces me to use a URI. Is there anything wrong in my visual studio or it has been discontinued, etc. this.NavigationService.Navigate (new ShowRoom ("", "")); // The best overload for navigation ... is some invalid argument Notice how the version selector you indicated on the MSDN article is set to .NET Framework 4.5 . This overload does not apply to Windows Phone 8 (for which version will be Silverlight ). Here is the definition of the navigation service for Windows Phone 8: You will see that there is only one navigat definition, a URI . You will use it like this: this.NavigationService.Navigate ("/ ShowRoom.xaml? Parameter1 = value1");

count - SQL Server CE 4.0 - Counting frequency of distinct values in multiple columns -

Image
I have a table with 20 columns and each row can have 0-4 (integer) value . / P> I would like to count the number of 0, the number of 1, the number of 2 in each column, which is for the subset given in that table, where the section is specified. A friend suggested the partition , but that is not supported in SQL Server CE. I suspect that I have to use the counting (expression) , but I can not understand what the expression will be. Can someone suggest me? Consider that you have a table minimum (subset. G) Choose, in the form of 'G1' and 'C1 & amp; amp; Choose + Cast (Val 1 to Vaikar (4)), select G as V as 'C2 & amp;' + Cast (Vertical form of Val 2 (4)) Val2 as the Val2 from the testing union as Sub Sets Group by Left (subset.g, 2), as the subtotal order 'C3 & amp; ' The result set will be such as

java - Where is sonar directory? -

What is sonar? Where is the sonar directory? I must have conf / wrapper.config in the sonar directory to change the cover command from JRR7 to JRE6. But what location can I locate? This is an explanation from user-> rsingh25: - Look at conf \ wrapper.conf in the soner directory, by default it's wrapper.java.command = java to fix it For the "wrapper.conf" file, wrapper.java.command = C: \ Program Files \ Java \ jdk1.6.0_XX \ bin \ java Change the following property of the link: - Gold is a code analysis tool for Java. Reply to Rungah 25 Perhaps someone had to use Sonard and correct JRE Had trouble using F you are not using the sonar, the answer is not very much to help.

What java modifier let's me use a boolean in any class and method -

I have a boolean bigger and lower middle class, I class wants to use it, as well as class b. If I try to put the boolean in the classroom then it gets stagnant and fails. Can anyone tell me what should I do? I do not know which essence is there. I'm not sure what you mean by "changes" to stabilize, but if If you want to reach the value of any frequency variable from another class, then you should declare it personal and make an accelerator method for it. Looking at your example: public class ClassB {private bullion is large, medium, small; public boolean is big () {return big;} public bullie Not Small () {return small;} public boolean Hamidiam () {return through;}}

html - If Globalization & Localization with resource files having diverse affect with Google indexing and searching of website content etc? -

I have developed with globalization & amp; To use resource files, localization and I have the content of my website in resource files, but not in the HTML of the site pages (I do not want hard code text on the html pages) so I know that Google can access my website and Can locate website content. As I know that we always keep our content in the html pages of the website and working hard for Google and SEO purposes but in my case all content comes from resource files to a web page. Here's my HTML code on the web page after using page resources & lt; Div class = "apiculture" & gt; & Lt; Div class = "post_content" & gt; & Lt; P & gt; & Lt; ASP: literal runat = "server" text = "& lt;% $ resource: resource, quinebienetometer1%>" / & Gt; & Lt; / P & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div class = "apoculture" & gt; & Lt; Div class = "pos...

c# - Clicking a button on one form while clicking on a different form -

I have two programs, both different names, which run independently of each other, I click on a button I would like to call the incident to be done on a form if it is being executed by clicking on a button on the other. I was able to do this by publicizing in VB , referring to DLL in Form 2 and namespace.form1 Call by clicking on .button_click but it can not work how to do this in C #. You must pass the reference to the form2 object ( which is executed by clicking on For launching the button in the RCGI application ) for the form1 object. If Form 2 is a separate add-in ( provided by a third party ) and any API functions, then I guess what you want to achieve Too difficult to do If you have created this add-in, you can expose a function so that other apps can click the button on this add-in. In addition, the mode of communication between the two add-ins also depends on how the add-ins is being loaded in the ARCGS application (in-process or out-process) depending on ...

vb.net - Connection to SQL Database -

I am making connections to the SQL database and in a connection I am changing my query several times, this is my basic structure I have the following questions 1) Is this the correct method of sending different queries in the SQL database? 2) Will this cause any memory leak or error. Dim conn set conn = CreateObject ("ADODB.Connection") with conn. Provider = "Microsoft.Jet.OLEDB.4.0". ConnectionString = "Data Source = C: \ MAP_sample.xls," & Amp; "Extended Properties = Excel 8.0;" With OpenOpen & RS = Object ("ADODB. Resizeate") Question = "Select" from [Sheet1 $] where STATEM = 'ABC' 'RS Open Quarry, Con R.Coose P> Change Question query = "SELECT * FROM [Sheet1 $] where id = '321' 'R.S. Open query, conn rs.close query query = "SELECT * FROM [Sheet1 $] where NAME = 'SMITH' '' Open query, conn rs.close set rs = nothing conn.close set conn looks...

c++ - How to control translation in a gettext system? -

I have used a lot of gatetext system in my C ++ application for translation into different languages ​​in the Linux environment. Okay now, suppose that the whole application has been translated from German to English. But I need to query some strings that should be in German (query on original string). Gettext ("Energy") -> It is in German and translates "energy" in English and user can see it but I need string "energy". There may be many solutions, but I am particularly looking into the gatetext system. Is there any way in Gatetext system to get the original text? Any help is appreciated In this way it is not possible with reverse translation gatetext. "Strawberry" msgstr "a drill" msgstr "a drill" msgstr "one phrase" You can not reverse- the translation of "una frays" back into English, because of two possible meanings , And you will not find what you mean.

css - word-wrap messes the position of the element -

Image
I have a problem with CSS word-wrap, it corrupts the status of the button according to the condition of that word That is shown below My CSS: .btn-small {width: 14.6%; Height: 100 pixels; Font size: 13px; Word-wrap: break-word; Margin: 0; } I am working on Chrome, What should I include in order to keep their position better? What do I add to the order Should your situation be better controlled? Use vertical-align: top inline- Level and table-cell element . More about the property.

expressionengine - Error when uploading PDF - Expression Engine -

Expression Engine File Uploader is rejecting uploaded PDF files and others. Still folders have the correct permissions and file upload preferences are correct. There was a cause of the problem expression engine XSS filtering setting. The filter was rejecting legitimate PDF files, because they also contain simple URLs. Turn on the problem of resolving this problem. Admin - & gt; Security & amp; Privacy - & gt; Security & amp; To XSS filtering upload session and change the file?

what is the use of NSMakeRange in objective c? -

I am new to objective C and most of the time I am using NSR in my code. I have come to know that 'NSMKRange' is why, I want to know what is the use of NSMKRange. This is a feature inline function, it's NSRange structure , returns it by populating it: (to .. ./foundation.framework/Headers/ NSRange.h ) NS_INLINE NSRange NSMakeRange (NSUInteger loc, NSUInteger Lane) {NSRange r; R.location = loc; R.length = len; Return r; } This makes it easy to create categories; Compare: unichar buffer [8]; [SomeString getCharacters: Buffer Range: NSMKrange (2, 8)]; From: unichar buffer [8]; NSRange category = {2, 8}; [SomeString getCharacters: Buffer Range: Category];

php - Cronjob not working with CodeIgniter -

I want to set up a cron job for my project and it works with a sub folder named VMS on my domain. . I have created a cron job with the controller: file: main.php Class: main method: termination alertlist location: public_html / vms / application / controllers / main Php I will try to use the method listed below to run the cron job but this gives me 2-different error messages with 2-separate cases. So, how can I run my cron job in a day? / usr / local / php4 / bin / php /home//public_html/vms/index.php Main End Alert Mail / usr / bin / php -q /home//public_html/vms/index.php Main End Alert Mail >> / dev / null / usr / bin / php / home // public_html / Vms / index.php Main End Alertmail / usr / bin / php /home//public_html/vms/index.php 0 13 * * * php home // public_html / vms /index.php Main / End alertmail php /home//public_html/vms/cron.php/Main / End Alert Mail ~ / public_html / vms / index.php Main End Alertmail Wget php -q /home//public_html/vms...