Posts

Showing posts from August, 2011

bootstrap switch without text-label -

Image
I use the bootstrap switch without the white space ( data-text-label ) in the middle Wanted both data-on-label and data-of-label both options. And maybe I was going to solve it but I should go to other goods due to the dead line for the project. If someone knows I am very happy to know how to achieve it and share it with me. I am answering your question and putting it to assist future visitors I am here. label width: 0 main child Div width: 200 width: 50% .

css - Vertical align of div -

I am trying to create a simple html / css graph, in which to separate the bars for more than 0 values And there are smaller prices than 0. It looks like this: And I'm stuck with the vertical alignment of the top division focusing from the bottom so I need the div with the class bar class, class graph_top Can someone help me in that? I looked at some tutorials but I could not find anything that worked with percentages in terms of width for width. Image explanation: Here is the code: HTML & lt; Div class = "graph" & gt; & Lt; Div class = "graph_top" & gt; & Lt; div class = "lol" & gt; & Lt; div class = "bar" style = "height: 1px;" & Gt; & Lt; / Div & gt; & Lt; Div class = "bar" style = "height: 11px;" & Gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div class = "horizontal_line" & gt; & ...

logout - Devise is giving me a routing error when logging out. Rails 4 -

For some reason I can not log out of the division, it does not keep any path error in me. Ensure that destroy_user_session_path is a removal method, your logout link should look like this: & lt;% = link_to destroy_user_session_path, method :: delete% & gt; Also, make sure that you have this application inside. Js: // required jquery_ujs

javascript - How to restructure object to array of objects? -

рдореЗрд░реЗ рдкрд╛рд╕ рдпрд╣ рдСрдмреНрдЬреЗрдХреНрдЯ рд╣реИ var рдбреЗрдЯрд╛ = {_id: 131233442543, SocialMedia_0__Name_: "facebook ", рд╕реЛрд╢рд▓ рдореАрдбрд┐рдпрд╛_рдбрдмреНрд▓реВURL_:" http://facebook.com/test ", рд╕реЛрд╢рд▓ рдореАрдбрд┐рдпрд╛_рдЖ_рдирд╛рдо_:" рдЯреНрд╡рд┐рдЯрд░ ", рд╕реЛрд╢рд▓рдореАрдбрд┐рдпрд╛_1__URL_:" http://twitter.com/test ", рд╕реЛрд╢рд▓рдореАрдбрд┐рдпрд╛_1398083781749__ рдирд╛рдо:" рд▓рд┐рдВрдХ рдХрд┐рдпрд╛ рдЧрдпрд╛ ", рд╕реЛрд╢рд▓рдореАрдбрд┐рдпрд╛_1398083781749__URL_:" http: // linkin .com / test "}; рдФрд░ рдореБрдЭреЗ рдСрдмреНрдЬреЗрдХреНрдЯ рдХреЛ рдЗрд╕ рддрд░рд╣ рд╕реЗ рдкреБрдирд░реНрдЧрдарди рдХрд░рдиреЗ рдХреА рдЖрд╡рд╢реНрдпрдХрддрд╛ рд╣реИ: justSites = [{рдирд╛рдо: "facebook", url: "http: // facebook.com/test "}, {рдирд╛рдо:" рдЯреНрд╡рд┐рдЯрд░ ", рдпреВрдЖрд░рдПрд▓:" http://twitter.com/test "}, {рдирд╛рдо:" рд▓рд┐рдВрдХреНрдбрдЗрди ", рдпреВрдЖрд░рдПрд▓:" http://linkedin.com/test " }]; рдЗрд╕реЗ рдРрд╕рд╛ рдХрд░рдирд╛ рдЪрд╛рд╣рд┐рдП: var justSites = [], рдореА; ({рдирд╛рдо: рдбреЗрдЯрд╛ [рдкреА], рдпреВрдЖрд░рдПрд▓: рдбреЗрдЯрд╛ ["рд╕реЛрд╢рд▓рдореАрдбрд┐рдпрд╛ _" + рдПрдо [1] +) [рдкреЗрдЬ рдкрд░] (рдорд╛рдИ = рдкреАред рдореИрдЪ (/ рд╕реЛрд╢рд▓рдореЗрдбрд┐рдпрд╛ _ (\ d +) __ рдирд╛рдо / /) "__URL_"]});

python - syncdb error using mysql -

(im ji python2.7.6 рдкрд░ django 1.6) рдореИрдВрдиреЗ рдПрдХ рдРрдк рдХреЙрд▓ рд╕рд╛рдЗрдирдЕрдк рдмрдирд╛ рджрд┐рдпрд╛ рд╣реИ django, рдЬрдм рдореИрдВ sqlite рдЗрд╕реНрддреЗрдорд╛рд▓ рдХрд┐рдпрд╛ рдерд╛ рдореБрдЭреЗ Python manage.py syncdb рдХрд░рдиреЗ рдореЗрдВ рдХреЛрдИ рд╕рдорд╕реНрдпрд╛ рдирд╣реАрдВ рдереА рд▓реЗрдХрд┐рди рдЕрдм рдпрд╣ рд╣реИ рдХрд┐ mysql рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд░ рдореИрдВ рдпрд╣ рд╕рдВрджреЗрд╢ рдкреНрд░рд╛рдкреНрдд рдХрд░рддрд╛ рд╣реВрдВ: рдЯреНрд░реЗрд╕рдмреИрдХ (рд╕рдмрд╕реЗ рд╣рд╛рд▓ рдХреА рдХреЙрд▓ рдЕрдВрддрд┐рдо): рдлрд╝рд╛рдЗрд▓ "рдкреНрд░рдмрдВрдзрд┐рдд рдХрд░реЗрдВ" рдкреАрдИ ", рд▓рд╛рдЗрди 10, рдореЗрдВ & lt; рдореЙрдбреНрдпреВрд▓ & gt; execute_from_command_line (sys.argv) рдлрд╝рд╛рдЗрд▓ "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", рдкрдВрдХреНрддрд┐ 399, execute_from_command_line рдЙрдкрдпреЛрдЧрд┐рддрд╛ рдореЗрдВред execute () рдлрд╝рд╛рдЗрд▓ "/ usr / рд╕реНрдерд╛рдиреАрдп /lib/python2.7/dist-packages/django/core/management/__init__.py ", рд▓рд╛рдЗрди 392, рд╕реНрд╡рдпрдВ рдореЗрдВ рдирд┐рд╖реНрдкрд╛рджрд┐рдд рдХрд░реЗрдВред fetch_command (рдЙрдк рдЖрджреЗрд╢)ред run_from_argv (self.argv) рдлрд╝рд╛рдЗрд▓" / usr / local / lib / python2 .7 / dist-packages / django / core / рдкреНрд░рдмрдВрдзрди / base.py ", рдкрдВрдХреНрддрд┐ 242, run_from_argv self.execute рдореЗрдВ (* рдЖрд░реНрдЧреНрд╕, ** рд╡рд┐рдХрд▓реНрдк .__ dict__) рдлрд╝рд╛рдЗрд▓" /usr/local/lib/python2.7/dist -packages / django / core / managemen...

jquery - issue with get array values outside the function in javascript? -

I have created an array that will store dynamic values тАЛтАЛcoming from DB. When I print the array inside the transaction function it is printing when I tried to print the side and I could not get the price. I have declared the array globally what is the problem, my code is as follows; function sendCategoryDetails () {var selected_category = $ ('# select-choice: selected'). Val (); Warning ("control:" + selected_category); Var mycoodinates description; Var myLocation = New Array (); Var db = window sqlite plugin.openDatabase ({name: "MYDB"}); db.transaction (function (tx) {tx.executeSql ("select location of location WHERE category = '" + selected_category + "';", [], function (tx, ridge) {for (var i = 0; i & lt; res.rows.length; i ++) {myLocation [i] = res.rows.item (i) .post;} alert (myLocation + "length:" + myLocation.length); // value print There is no value}}}}; alert (my position + "length:" + myLo...

model - Rails : Custom Callbacks at Runtime? -

I am thinking that it is possible to make a model possible in rail with the custom callback code on runtime? I have a situation where I have many "nodes" that are making "events", and each node probably needs to run a specific callback on the event. For example, before a node can create an event, it may be necessary to call additional data on a third-party API, after creating a single event, the owner may need to send an email. In my head, when I do "POST / node / 4 / event", then it is understandable to set something like this: class nodes :: event controller & Lt; ApplicationController def # ... security checks are given place and if we have @ node if @node.requers_custom_callbacks? Load the file with callback for # @ Node.id, #node4 event extensions like some # event models, finally apply the node 4 avenue extension. End End End This node-specific code allows my event model, and I create / test different custom node extensions. Is th...

python - Running rbtimer from emperor -

I have a web application managed by a monarch and two separate vassals. Because they both write in different data sources, I need to synchronize both a file and that's why I decided to add a timer job to my emperor. To: [ uwsgi] strict = true die -on-term = true memory-report = true uid = www-data gid = www-data emperor = xxx.ini logdate = true import = synchronize and It is synchronized .i : import from uwsgidecorators import rbtimer, lock INTERVAL = 10 @lock @rbtimer (INTERVAL) def synchronize (): "" "synchronizes data between Redis and PostgreSQL Land. " "Print 'aaa' I run my emperor in this way: uwsgi --ini emperor.ini But nothing happens, the console 'AAA' 'Never print. What else am I missing? You need a process (a worker or mule)) A worker to run the signal handler (Adding socket directive) or adding a mule (twisted = true) In case of mule you need to add target = mules to @ rbtimer decorator)

File not being written to in vb.net -

I have searched some Google and everyone gives me the same answer which is not working. I hope I'm remembering some of its simplicity. I am trying to write a line in the test file. The file was created properly when I used the same code, and if no error has been thrown, the txt does not write / save the file I stream in VB Here's my code using the author: Importing the system. IO Public Class Form 1 Private All BTNGG2DirectClick (as the sender in the form of the object, and event as ARG) handles BTNGN2DRAA Try 'This file has been created and protected from where it was saved: file = string as string = "c: \ users \ clint \ save.txt" if file. Example (fileLoc) then use SW as a new string (fileLoc) sw. ("Write a Test Line") sw.Close () end if the Android MSBbox (Expanded in the "C ++ 2D array text file:" + file lock, MSBbox style. Oak, "Successful"), using Expand MSBBX ("Error:" + E. Toaster (): MSBbox style. OK, "...

jquery - Jssor (nested slider): how to disable AutoPlay? -

Do anyone know how to stop nested sliders from starting on loading? I have tried entering "$ Autoplay: wrong" inside "Weight NestedSlider Options", but it does not work Thanks in advance. Source: Example- jquery & gt; Nested-slider. Source.html There is no 'auto play' for the main slider and 3 kids By default, the sliders are handled by the manual API call. By removing the following code, you will be able to get whatever you want. Function OnMainSliderPark (current index, indland) {$ .each (nested slider, function (index, nested sledder) {nested sledger. Pause ();}); Set Timeout (function () (nested slider [current index]. $ Play ();}, 2000);} at Jssor_slider1. $ ($ JssorSlider $. $ EVT_PARK, OnMainSliderPark); OnMainSliderPark (0, 0); In addition, there is a variation of the nested slider.

css selectors - CSS rule for two class names provided in spaces for the class attribute -

рдореЗрд░реЗ рдкрд╛рд╕ extjs рдореЗрдВ рдПрдХ рдмрдЯрди рдШрдЯрдХ рд╣реИ рдЗрд╕ рдШрдЯрдХ рд╕реАрдПрд╕рдПрд╕ рдХреЗ рд▓рд┐рдП class = 'one btn-exit-cls рддреАрди рдЪрд╛рд░ рдкрд╛рдБрдЪ x-menu-active' рдЬреИрд╕рд╛ рд╕реЗрдЯ рдХрд┐рдпрд╛ рдЧрдпрд╛ рд╣реИред рдЙрд╕ рд╡рд░реНрдЧ рдирд╛рдо btn-exit-cls рдЕрджреНрд╡рд┐рддреАрдп рд╣реИ рдЬрдм рдЗрд╕ рдмрдЯрди рдкрд░ рдХреНрд▓рд┐рдХ рдХрд┐рдпрд╛ рдЬрд╛рддрд╛ рд╣реИ рдПрдХ рдореЗрдиреВ рджрд┐рдЦрд╛рдИ рджреЗрддрд╛ рд╣реИ рдЬреЛ рд╕реАрдПрд╕рдПрд╕ рд╡рд░реНрдЧ рдХрд╛ рдирд╛рдо x-menu-active рд╡рд░реНрдЧ рдХреЛ рдЬреЛрдбрд╝рддрд╛ рд╣реИ рдореИрдВ рдЪрд╛рд╣рддрд╛ рдерд╛ btn-exit-cls рдФрд░ x-menu-active рджреЛрдиреЛрдВ рдХреЗ рд╕рдВрдпреЛрдЬрди рдХреЗ рд▓рд┐рдП рдирд┐рдпрдо рд╕реЗрдЯ рдХрд░реЗрдВ рддрд╛рдХрд┐ рдореИрдВ рд╡рд┐рднрд┐рдиреНрди рдмрдЯрдиреЛрдВ рдХреЗ рд▓рд┐рдП рдореЗрдиреВ рд╕рдХреНрд░рд┐рдп рд╢реИрд▓реА рдХреЛ рд▓рд╛рдЧреВ рдХрд░ рд╕рдХреВрдВред рдореБрдЭреЗ рдХреНрдпрд╛ рдЙрдореНрдореАрдж рд╣реИ .btn-exit-cls .x-menu-active {// рдХреБрдЫ Css} .btn-delete-cls .x-menu-active {// рдХреБрдЫ рд╕реАрдПрд╕рдПрд╕} .btn-add-cls .x-menu-active {// рдХреБрдЫ рд╕реАрдПрд╕рдПрд╕} I рдореМрдЬреВрджрд╛ рд╕реАрдПрд╕рдПрд╕ рдХреЛ рд╕рдВрд╢реЛрдзрд┐рдд рдирд╣реАрдВ рдХрд░рдирд╛ рдЪрд╛рд╣рддрд╛ред рдореИрдВ рд╕рд┐рд░реНрдл рдУрд╡рд░рд░рд╛рдЗрдб рдХрд░рдирд╛ рдЪрд╛рд╣рддрд╛ рд╣реВрдВред рдпрджрд┐ рдЖрдк рдЙрди рддрддреНрд╡реЛрдВ рдХреЛ рд▓рдХреНрд╖рд┐рдд рдХрд░рдирд╛ рдЪрд╛рд╣рддреЗ рд╣реИрдВ рдЬрд┐рдирдореЗрдВ рджреЛрдиреЛрдВ рдХрдХреНрд╖рд╛рдПрдВ, рдЖрдкрдХреЛ рдЙрдирдХреЗ рдмреАрдЪ рдПрдХ рд╕реНрдерд╛рди рдХреЗ рдмрд┐рдирд╛ рд▓рд┐рдЦрдирд╛ рдЪрд╛рд╣рд┐рдП: .btn-exit-cls.x-menu-active {...} рдЕрдиреНрдпрдерд╛, рдпрджрд┐ рдЖрдк рдЗрд╕реЗ рдЗрд╕ рддрд░рд╣ wirte: .btn-exit-cls .x-menu-active {...} рдЖрдк рдХрд░ рд░рд╣реЗ рд╣реИрдВ рдХрдХреНрд╖рд╛ x-menu-active рдХреЗ рд╕рд╛рде рд▓рдХреНрд╖реНрдпреАрдХрд░рдг рддрддреНрд╡ рдЬреЛ рдХрдХреНрд╖рд╛ btn-exit-cls...

google admin sdk - How Do I Retrieve a List of Users Who Has includeInGlobalAddressList set to false? -

I am looking for a way to recover all the users in my domain which includes InGlobalAddressList = false what the value of the API Is there any way to do this? I do not think this is a way to do this via API, the complete list of searchable query attributes , And is not included in the InGlobalAddressList is one of them.

junit - How to run Selenium webdriver script in mulitple browser without changing parameters - java -

I want to run my WebDrive script only once after running the same in more than one browser I am In my current framework, I have placed all the browser names in the properties file and from there I am receiving it and passing through it as a parameter. But the problem is this way, in one execution it runs only for one browser. If I want to run it in another browser, then I have to give another browser name for another execution. I want to run it once and execute the script for a browser, after which it should also run automatically for other browsers. I'm using junit. How can I get it? Take a look at Selenyun or you can create a test site and use the system properties set on. Something like this: 1- Create a test site with all the exams import org.junit.runner.RunWith; Import org.junit.runners.Suite; Import org.junit.runners.Suite.SuiteClasses; @Ravivith (suite category) @ suite classes ({MyClassTest.class, MySecondClassTest.class}) Public class alstays {} 2- Run ...

R in quantmod error -

x = read.csv (file.choose ()) рд╕рд┐рд░ (x) рджрд┐рдирд╛рдВрдХ рдЦреБрд▓реА рдЙрдЪреНрдЪ рдХрдо рдмрдВрдж рдЦрдВрдб 1 2013/1/2 13257 13289 13162 13194 168353 2 2013/1/3 13195 13198 13055 13055 242457 3 2013/1/4 13050 13100 13005 13079 256215 4 2013/1 / 7 13085 13128 13025 13126 228488 5 2013/1/8 13136 13148 13064 13088 227064 6 2013/1/9 13091 13104 13044 13072 21 9 862 рдкреБрд╕реНрддрдХрд╛рд▓рдп (quantmod) рдЖрдк рдЗрд╕реЗ рдПрдХ рдкрдВрдХреНрддрд┐ рдореЗрдВ рдХрд░ рд╕рдХрддреЗ рд╣реИрдВред рдЬрд╛рд╕реВрд╕ & lt; -as.xts (read.zoo ("~ /") рдЖрдкрдХреЗ рдбреЗрдЯрд╛ рд▓реЛрдб рд╣реЛ рд░рд╣рд╛ рд╣реИ, рдпрд╣ рдорд╛рдирддреЗ рд╣реБрдП "рдЖрдкрдХреЗ рдбреЗрдЯрд╛" рдирд┐рд░реНрджреЗрд╢рд┐рдХрд╛ рдореЗрдВ "spy.csv" рдирд╛рдордХ рд╣реИ, SP500 OHLC рдбреЗрдЯрд╛ред рдбреЗрдЯрд╛ / spy.csv ", рд╣реИрдбрд░ = TRUE, sep =", ", colClasses = c (" рджрд┐рдирд╛рдВрдХ ", рдкреНрд░рддрд┐рдирд┐рдзрд┐ (" рд╕рдВрдЦреНрдпрд╛рддреНрдордХ ", 4))) рдмрд╛рд░рдЪрд╛рд░реНрдЯ (SPY) рдЖрдк рд╕рднреА рдХреЛ рдЗрд╕рдХреА рдорд╣рд┐рдорд╛ рдореЗрдВ рдЪрд╛рд░реНрдЯ рджрд┐рдЦрд╛рдПрдВрдЧреЗ: -)

Clear cookies on closing browser in php codeigniter -

Image
I am using a php codeigniter to create a larger application where I have different log in options for users of different levels have to give. And I've done a lot with everything when the user closes the browser so I want to clear all the cookies and sessions. how can I do this. Below is a very basic session set in the /application/config/config.php file. To set $ config ['sess_expire_on_close'] = TRUE; You

php - Symfony Forms - Is it possible to create a single entity from two forms? -

I understand that you can embed the form in some other form. UserCoreType: Username , password , email UserPersonalType: I want to do this with a registration form, which included both of these types, and I only provide personal information I want to create another form to update (i.e. not really a new look, just use UserPersonalType) I try to create 2 different user entities How can I do it for each form? I need to build a unit. OR How can I restrict the field? If I had to create just one user type, how can I make it so that the unit can be built earlier? For registration form simply enter UserPersonalType in UserCoreType Embed and use individual UserPersonalType to update personal information. UPDATE You can also use a single form for registration and updated information. Some fields use PRE_SET_DATA on the EventListener to read only.

vb.net - parse an xml file without changing the encoding and preserving the file format -

рдореВрд▓ xml рдлрд╛рдЗрд▓ рдХреЛ UTF-8 рдмрд┐рдирд╛ рдПрдУрдПрдо рдХреЗ рд╕рд╛рде рдПрдиреНрдХреЛрдб рдХрд┐рдпрд╛ рдЧрдпрд╛ рд╣реИ & lt;? Xml рд╕рдВрд╕реНрдХрд░рдг = "1.0" рдПрдиреНрдХреЛрдбрд┐рдВрдЧ = "рдпреВрдЯреАрдПрдл -8"? & Gt; & LT; some_text & gt; & LT; ada / & gt; & LT; рдлрд╝рд╛рдЗрд▓ / & gt; & Lt; title & gt; & lt; [CDATA []] & gt; & lt; / title & gt; & LT; рдХреЛрдб / & gt; & LT; parathrhseis / & gt; & Lt; / some_text & gt; рдореИрдВ рдЗрд╕ рдлрд╝рдВрдХреНрд╢рди рдореЗрдВ рд╢реАрд░реНрд╖рдХ рдореЗрдВ рдкрд╛рда рд╕реЗрдЯ рдХрд░рдиреЗ рдХрд╛ рдкреНрд░рдпрд╛рд╕ рдХрд░рддрд╛ рд╣реВрдВ: рдордВрдж myXmlDocument рдХреЗ рд░реВрдк рдореЗрдВ XmlDocument = New XmlDocument () рдордВрдж рдиреЛрдб рдЬреИрд╕рд╛ рдХрд┐ XmlNode Dim as String s = "name.xml" рдпрджрд┐ System.IO.File.Exists (s) = False рдлрд┐рд░ рдЧрд▓рдд рдЕрд╕рдлрд▓ рд╕рдорд╛рдкреНрдд рдХрд░реЗрдВ рдпрджрд┐ MyXmlDocument.Load (s) рдиреЛрдб = myXmlDocument.DocumentElement рдиреЛрдб рдореЗрдВ рдкреНрд░рддреНрдпреЗрдХ рдиреЛрдб рдХреЗ рд▓рд┐рдП рдкреНрд░рдпрд╛рд╕ рдХрд░реЗрдВред ChildNodes рдЕрдЧрд░ рдиреЛрдбред рдирд╛рдо = "рд╢реАрд░реНрд╖рдХ" рддрдм рдиреЛрдбред рдкреНрд░рдердо рдЪрд╛рд╡рд▓ред рдЗрдирд░рдЯреЗрдХреНрд╕реНрдЯ = "рдЯреЗрдХреНрд╕реНрдЯ" рдЕрдВрдд рдХреЗ рд▓рд┐рдП рдмрд╛рд╣рд░ рдирд┐рдХрд▓реЗрдВ рдпрджрд┐ рдЕрдЧрд▓рд╛ myXmlDocument.Save (рдПрд╕) рдЕрдкрд╡рд╛рдж MsgBox рдХреЗ рд░реВрдк рдореЗрдВ рдкрдХрдбрд╝реЗрдВ ("рдПрдХреНрд╕рдПрдордПрд▓рдкреАрд░реНрд╕рд┐рдВрдЧ рдореЗрдВ рддреНрд░реБрдЯрд┐:...

c# - EF 5 cast a ICollection into another -

I have a component that accepts two types of data sources Public Interface Ia .. Icons & lt; Ib & gt; Expansion {Received; Set; }} Public Interface IB {....} Then I have two EF classes that implement the interface Public class B: IB { } And my problem here is how to expand MyDetail in MyDetail by expanding and expanding, I use MyDetail for detail in the public class a: Ia {public virtual Ichlanack & lt; B & gt; MyDetail {get; set;} // How to expand MyDetal to detail and expand on MyDetail / some public virtual Icicle & lt; Ib & gt; Expansion {get {return MyDetail;} set {MyDetail = value}}}} Is that correct? Is there another incomplete for this conversation? You can not do this Icoding is not coherent, so you can Icon ; As Icoding Ib & gt; (in the recipient), and can not treat the nutrients, so you can the icon Icoding B & gt; (in setter) can not be treated. Icoding & lt; T & gt; is irreversible (Note tha...

extract customers with same hobbies with mysql query -

customer IDs | Hobbies I would like to use mysql query to remove those who have the same hobby. If anyone has more hobbies then we have a line for every hobby. > It is easy to use Select customers from customer where hobby = 'football' My problem is that I Want to find hobby. For example ' football ' and ' swimming ' and the query should contain only customers who have both. Is it possible to do this with query or should I use the stored procedure and how? Select the customer from the customer, where the number of 'amateur' ('swimming', 'football') is in the customer's name.

java - parse json array in android -

I need a help ... I have a php file which gives me two Jason Array which are as follows: {"id": "1", "item": "hammers", "corridor": "20"} {"id": "1", "item": "hammers" "corridor": "20 "}] [{" Id ":" 1 "," itemfound ":" your item #item "," thank you: ":" And thanks for using Texaco! " }] Now, I want to get second array items in Android. I have the following code that is now like: JSONArray jsonArray = New JSONArray (Results); for (int i = 0; i & lt; jsonArray.length (); i ++) {JSONObject jsonObject = JsonArray.getJSONObject (i); Items.add (jsonObject.getString ("item")); Aisles.add ("" + jsonObject.getString ("item");} But obviously, it gives me the object from the first array. I want to get the objects from the other Any suggestion. Your JSON is not valid, b...

encoding - Why is the output of the linux bash64 command different than other encoders? -

If I run the command echo 1234 | base64 , I get back to MTIzNAo = . If I input a string into other encoders (for example), I get different MTIzNA == . I see a similar pattern with the difference between the encoder. Both outputs look very similar, but differences from the last or the last to the last character are different. echo 12345678 | Base 64 Output MTIzNDU2NzgK , but I found MTIzNDU2Nzg = on base64encode.org, nodejs also as an encoder of base 64 encoder Returns the output, so I'm assuming this is not true in how Linux is using the base64 command. What is the difference? Because there is a new line: alex @ galene ~ $ Echo -n 1234 | base64 MTIzNA ==

c# - Why can my lambda expressions not use the same internal variable? -

I'm new to C # and it was working with lambda values. My question is why does the parameter list not have the same variable in each of them? If you do note in print (q is variable) and in square (there is variable in c) and there are variables in add (x, y) and in ISL constanten (f variable is) what if i want to make them all the parameter The name, such as pizza can be done. It was on the tutorial I was looking at My second case is that if you make better code instead of using regular functions? I think this is called Lambda Expression. I heard some different names on the tutorial video. Question: Can only one variable be used in different lambda signage? I want to know if I can say that use all the variable symbols in my lambda expressions verb & lt; Int & gt; Print = index = & gt; Console.WriteLine (index); Code: Action & lt; Bool & gt; Print = q = & gt; Console.WriteLine (Q); Funk & lt; Double, double & gt; Class = c = ...

php - Save value as other table value -

I have an HTML form that saves all entered values тАЛтАЛin SQL database, one of the options drawn by the database Dropdown menu is there. I want a way to save the population option because this is the user ID number instead of a readable name. There is another column in the ID number entry is currently using it to populate the dropdown: $ sql = "select site by name"; $ Result = mysql_query ($ sql); Echo "& lt; select name = 'venuename' & gt;"; While ($ line = mysql_fetch_array ($ result)) {resonant "& lt; option value = '" $ line [' name '] "' & gt;" . $ Line ['name'] "& lt; / option & gt;"; } Resonate "& lt; / select & gt;"; Get the id ID value attribute. $ sql = "SELECT id, name by name"; $ Result = mysql_query ($ sql); Echo "& lt; select name = 'venuename' & gt;"; While ($ line = mysql_fetch_assoc ($ result...

cross browser - Same Origin Policy and subdomains -

рдХреНрдпрд╛ http://acme.help.com рдФрд░ http: // acme .com рд╕рдорд╛рди рдореВрд▓ рдХреЗ рд░реВрдк рдореЗрдВ рдорд╛рдирд╛ рдЬрд╛ рд╕рдХрддрд╛ рд╣реИ? рдХреНрдпрд╛ рдпрд╣ рдХреБрдЫ рдкреНрд░рддрд┐рдмрдВрдзреЛрдВ рдореЗрдВ рдЖ рдЬрд╛рдПрдЧрд╛? рд╣рд╛рдБ, рдпрд╣ рд╡рд┐рдлрд▓ рд╣реЛ рдЬрд╛рдПрдЧрд╛ рдореВрд▓ рдХреЗ рдореВрд▓ рд╡рд┐рдЪрд╛рд░ рдХреЗ рдХреНрд░рдо рдореЗрдВ, рдЙрдирдХреА рдпреЛрдЬрдирд╛, рд╣реЛрд╕реНрдЯ рдФрд░ рдкреЛрд░реНрдЯ рдХреЛ рдорд┐рд▓рдирд╛ рдЪрд╛рд╣рд┐рдПред рдпрд╣рд╛рдВ рдХреБрдЫ рдЙрджрд╛рд╣рд░рдг рджрд┐рдП рдЧрдП рд╣реИрдВ:

sql - Alternative to like/ like any?... regexp? -

I have a terabyte dataset that looks like the following: Customer_ID | Targeting_pradesh 12 | Targ = EU, targ =! Eu.Fr 34 | Targ = Asia 56 | targ =! EU '!' Means 'not equal' for example, in line # 1, the client wants to target the European Union, but wants to exclude France. I want to create a region that has flag (with '1') in any row where 'positive' targeting is. From 'positive' targeting, I am mentioning any row where clearly there is a specific area ('negative' targeting will be where a sector is clarified, such as boycott of France in Row # 1) For example, Line # 1 includes both positive and negative targeting, line # 2 includes only positive targeting, only negative targeting included in line # 3 Is. The problem is facing that a simple matter statement will not work (as far as I can tell) I have tried two statements below: ( When target_region is like '% targ =%', then 1 and 0 end) as the target_ flag (when...

c++ - What's the quickest way to return the contents of a webpage in Qt? -

So, I'm trying to run some simple code in QT to return the contents of a given web page I am After a quick research, I was able to develop my own class to simplify the process: WebFetch :: WebFetch () = New QNetworkAccessManager (this); Connect (name, signal (end (QN network code *)), this, slot (Finish (QN NetworkCar * *)); } QString WebFetch :: get (QString url) {nam- & gt; Get (QNetworkRequest (QUrl (url))); } Zero WebFetch :: Finish (QNetworkReply * Answer) {QByteArray Data = Answer-> readAll (); Cue string straw (data); } However, I have a big problem with the code above that the call is asynchronous; I will prefer the "get" function to return the string only after receiving it, But it seems impossible that he has to wait for the finished signal, there is no way to "get" at that point which retrieves anything that has an option for the above method by the "finished" slot. Or am Is there any way that I can receive "to bring ba...

java - Is Classic Spring MVC Deprecated? -

I am trying to figure out how to use the classic MVC controller (eg, et al.) The only thing I have found is only a part of using the material with an Alpeas (...). Still, I have not seen the boycott notice in Jawadok. The classic spring MVC usage is officially demoted? What version is this version from? and its subclasses have been removed from Spring 3.0 in favor of annotation-based controllers.

fontawesome icons with twitter-bootstrap-rails doesn't show on staging environment -

Railway (3.1.2) Twitter-Bootstrap-Rail (2.2.8) application with gem. In the app views, Font uses a terrific icon in Application.css.scss @import "bootstrap_and_overrides"; bootstrap_and_overrides.css.less @import "twitter / bootstrap / bootstrap"; @ Import "twitter / bootstrap / responsive"; // Set the perfect phantom path @ScienceStrite Path: Image-URL ("Twitter / Bootstrap / Glyphikon-Deadling Page"); @ConviteSriet Path: Image-URL ("Twitter / Bootstrap / Glyphicon-Deadlly-White-Pen"); // set Font Awesome (Font Awesome is default.You can deactivate by commenting below the lines) @ fontwebsitepath: property-url ("fontweather-webfont.ot"); @ Fontwavesetpath_ifix: property-url ("fontawesome-webfont.eot? #iefix"); @FontViewWebFace: Asset-URL ("fontawesome-webfont.woff"); @ Font ahompatiti path: asset-url ("fontoose-webfonts.ttf"); @ Font assists swing path: asset-url ("fontawesome-web...

php - full path to upload files to server -

I am getting an error while uploading the file I uploaded the file that uploads the file The problem is that I'm calling it with a different file and different folders, which means that my folder on which the image folder is changing. WARNING: move_uploaded_file (http: // localhost) (I have the folder name - "pictures / user files") /dogger/images/usersFiles/13981072220-1.jpg) [function.move-uploaded-file]: failed to open the stream: HTTP wrapping in the \ "programming program (x86) \ wamp \ www \ dogger Does not support: 127: Warning: move_uploaded_file () [function.move-uploaded-file]: 'C: \ Program Files (x86) \ wamp \ tmp \ php9D89.tmp' to 'Unable to move to http: http : // func \ func.global.php: //localhost/dogger/images/usersFiles/13981072220-1.jpg 'In: \ Program I'm running a code from my local computer (x86) \ wamp \ www \ dogger \ func \ func.global.php on line 127 : if ($ _SERVER ['REMOTE_ADDR'] == "127.0...

What is the ontology of UML? -

I'm curious to know what is UML's otology? diagrams, etc. Or things like organization, aggregation, structure etc ...? I tried googling but the answers were very ambiguous. How is it ... a systematic concept of a concept is the concept of UML software elements ( Those things you say). Use Case Diagram is a concept of the functionality of the system. An association is a concept of relations between 2 pieces of code, etc. From this, I would think that UML is the specificity otology, it describes all the purposes and uses of elements of UML.

javascript - Ember.js: Using an ArrayController without a route? -

I have a list of categories that I would like to display on the page. I have been looking for hours to walk properly, but I find conflicting information and methods that are either not working or dislike with the current version of Amber. The app and amber-data item to create: var app = amber Apps .create (); App.ApplicationAdapter = DS.FixtureAdapter; App.Store = DS.Store.extend ({adapter: 'DS.FixtureAdapter'}); I am using amber-data with data for some categories: App.Category.FIXTURES = [{id: 1, name: category 1 ', details:' first class'}, {id: 2, name: 'category2', description: 'second category'}]; Then I made a model to present an example of a category ("version" relates to a different model, where examples of the category are examples of the examples): App.Category = DS.Model.extend ({versions: DS.hasMany ('version'), name: DS.attr ('string'), Description: DS.attr ('string') }); Then I ha...

x11 - Touchscreen Kivy app for Raspberry Pi -

Here is the scenario: I've written a GUI using the python framework, and I want to run it on a raspberry pie with the Are there. I have done the installation well, and TSLIB_FBDEVICE = / dev / FB1 TSLIB_TSDEVICE = / dev / Input / Touchscreen FrameBuffer = / dev / FB1 nohup startx & amp; The xwindow desktop GUI is running fine. I am unable to work my Kiwi Gui, though. I was able to get a test tkinter application working fine by setting the display environment variable. I tried to enter the following at the top of my kivy app, but there was no profit: os.environ ['SDL_VIDEODRIVER'] = 'fbcon' os. Whenever I run my application, this debug output is: / code> [info] [logger] /home/pi/.kivy/logs/kivy_14-04-21_10.txt [info] people in these Kivy v1.8.1-Dev [information] [Python] v2.7.3 (default, March 18, 2014, 05:13:23) [GCC 4.6.3] [information] [Factory] loaded with 157 symbols [information] [image] Rider: img_tex, img_dds, img_pygame, img_gif...

c# - Code to Determine if FTP Directory Exists Suddenly Stopped Working -

I wrote the following code for a long time to determine whether an FTP directory exists: Public Child Directory Axis (String Directory) {try {FtpWebRequest Request = GetRequest (Directory); request. Method = WebRequestMethods.Ftp.List directory; (FtpWebResponse response = FtpWebResponse) as request.GetResponse () {StreamReader sr = New StreamReader (response.GetResponseStream (), System.Text.Encoding.ASCII); Sr.ReadToEnd (); sr.Close (); Response.Close (); } Back true; } Hold {} return false; } Secure FtpWebRequest GetRequest (string file name = "") {FtpWebRequest request = WebRequest.Create (_host.GetUrl (filename)) as FtpWebRequest; request. Authentication = new network credentials (username, password); request. Proxy = faucet; request. KeepAlive = false; Return request; } This code has worked for many years, but today it is not so. When testing a directory that does not exist, the code DirectoryExists () now throws an exception, and returns the method incorrect...

security - Rails has_secure_password: is it actually hashing the password in the DB? -

has_secure_password рдХреЗ рд╕рд╛рде рд╡рд┐рд╢рд┐рд╖реНрдЯ рд░реЗрд▓ 4.1 рдРрдк рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд░ рдФрд░ рдЙрдкрдпреЛрдЧрдХрд░реНрддрд╛ рдореЙрдбрд▓ рдореЗрдВ рд╣реИ рдбреАрдмреА рдореЗрдВ рдПрдХ password_digest рдХреЙрд▓рдо рдЬрдм рдореИрдВ рдПрдХ рдирдпрд╛ рдЙрдкрдпреЛрдЧрдХрд░реНрддрд╛ рдмрдирд╛рдКрдБ, рддреЛ рдореИрдВ рдЕрдм рднреА рдХрдВрд╕реЛрд▓ рдореЗрдВ рд╕рд╛рджрд╛ рдкрд╛рда рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд░ рд╕рдХрддрд╛ рд╣реВрдВ: # rails console & gt; рдпреВ = рдпреВрдЬрд╝рд░ред рдиреНрдпреВ (рдИрдореЗрд▓: "test@test.com", рдкрд╛рд╕рд╡рд░реНрдб: "рдкрд╛рд╕рд╡рд░реНрдб") & gt; u.save & gt; u.password = & gt; "рдкрд╛рд╕рд╡рд░реНрдб" & gt; u.password_digest = & gt; "Xjdk ..." рд╣рд╛рд▓рд╛рдВрдХрд┐, рдЬрдм рдореИрдВ рдХрдВрд╕реЛрд▓ рд╕рддреНрд░ рдХреЛ рдмрдВрдж рдХрд░рддрд╛ рд╣реВрдВ рдФрд░ рдПрдХ рдирдпрд╛ рдкреНрд░рд╛рд░рдВрдн рдХрд░рддрд╛ рд╣реВрдВ, рддрдм рдореИрдВ рд╕рд╛рджрд╛ рдкрд╛рда рдкреНрд░рд╛рдкреНрдд рдирд╣реАрдВ рдХрд░ рд╕рдХрддрд╛: # рдХрдВрд╕реЛрд▓ рд╕рддреНрд░ рдХреЗ рдКрдкрд░ рдмрдВрдж рдХрд░реЗрдВ рдФрд░ рдПрдХ рдирдпрд╛ рдЦрд╛рддрд╛ рдЦреЛрд▓реЗрдВ & gt; u = User.find_by (рдИрдореЗрд▓: "test@test.com") & gt; u.password = & gt; рд╢реВрдиреНрдп рдореИрдВ рдорд╛рди рд░рд╣рд╛ рд╣реВрдБ рдХрд┐ рд╕рд╛рджрд╛ рдкрд╛рда рдкрд╛рд╕рд╡рд░реНрдб рдХреЗрд╡рд▓ рдкрд╣рд▓реЗ рд╕реНрдерд┐рддрд┐ рдореЗрдВ рд╣реА рдкреБрдирд░реНрдкреНрд░рд╛рдкреНрдд рдХрд░рдиреЗ рдпреЛрдЧреНрдп рд╣реИ рдХреНрдпреЛрдВрдХрд┐ рдпрд╣ рд╕реНрдореГрддрд┐ рдореЗрдВ рд╕рдВрдЧреНрд░рд╣реАрдд рдХрд┐рдпрд╛ рдЬрд╛ рд░рд╣рд╛ рд╣реИ рдФрд░ рдЬрдм рдореИрдВ рдХреЙрд▓ рдХрд░рддрд╛ рд╣реВрдВ u.password = & gt; "рдкрд╛рд╕рд╡рд░реНрдб" рдпрд╣ рдореЗрдореЛрд░реА рд╕реЗ рдорд╛рди рдкреБрдирд░реНрдкреНрд░рд╛рдкреНрдд рдХрд░ рд░рд╣рд╛ рд╣реИ, рдбрд╛рдЯрд╛рдмреЗрд╕ рдирд╣реАрдВ рд╣реИред рдореИрдВрдиреЗ рд╣рдореЗрд╢рд╛ рд╕реЛрдЪрд╛ ...

codeigniter - How to combine and & or operators in grocery crud -

I am using codeigniter and grocerycrud, I want to set up table with grocerycrud like this: SELECT * FROM from `dashboard`. 'Medid_ludlum` where FK_ludlum =' 190.26.88.131 'and date & gt; = '2014-03-04 09:40:00' and date & lt; = '2014-03-05 09:40: 00' and (ErrorGode = 1 or Audio_Status = 1); I tried to do this: $ uno = '1'; $ crud2 = new grocery store (); $ Crud2- & gt; set_theme ('datatables'); $ Crud2- & gt; Where ('FK_ludlum', $ ludlum_id); $ Crud2- & gt; Where ('date & gt; =', $ fechainicio); $ crud2- & gt; Where ('date & lt; =', $ fechafin); $ crud2- & gt; Where ('error_code =', $ uno); $ crud2- & gt; Or_where ('audio_status =', $ uno); $ Crud2- & gt; set_table ('medidas_ludlum'); $ Crud2- & gt; Column ('measurement', 'fecha', 'audio_status', 'high_alarm_status', 'low_alarm_status', 'over...

python - Importing Turtle graphics modules -

I believe I have just started Python 3.3 in turtle graphics, and Started with a YouTube presentation from to Turtle Import * . This allows at least the commands as FD (100) instead of the format I turtle.forward (100) etc. My questions are: Am I using an unacceptable shortcut using this format? How can I stop Python IDL from interpreting every command in this format as "Turtle Graphics"? "*" What does suffix mean, as is "everything"? If I should not ask many questions in a post, I apologize in advance, but they are relevant to each other and it seems logical. Normally, yes, you can avoid using the form from the module import * It does this that opens this module (a normal python file), and basically takes every function, class etc. defined in that file and adds it to your namespace. And you are right - * means "everything". Therefore, if I wrote a module named foo.py which contained the function named bar 1 , ...

r - Plotting the overlay using an exponential smoothing of a time-series using `lines()` -

Image
/ * I do not want to use R in the HoltWinters function, and I have used Holtwinters function But I really do not want to apply or copy the entire R code. Mainly I want to write a code, as a result we get the answer given by Holtwinters * * I have the following code so far, but I'm not sure which function I should use 1 An exponential lubricating data (nhtemp) required for New Hampshire from 9 to 12, 1971 and the lines () Plot overlay .ts (nhtemp) lines (nhtemp, col = "red") # plot.ts (nhtemp) to the same plot Gives it in the form !! I'm not sure how to overlay an exponential solubility of PS by using nhtemp lines () I do not want to try an forecast or statistics such as an external package, but I was trying the following for some experiments: I followed the instructions given in the following picture Tried but I found this error: & gt; Line (nhtemp $ fitted) Error in # lines (nhtemp $ fitted): Error in evaluating argument 'X' in ...

javascript - Common model in ExtJs 4 -

one ???? I have a few grids that have the same fields, I want to create a normal model and extend it from below: Ext.define ('my.model.MyModel', {extend : 'Ext.data.Model', field: [{name: 'fieldA'}, {name: 'fieldB'}]}); Ext.define ('my.model.MyModelA', * Expand: 'my.model.MyModel', Field: [[// How do I add extra columns to sub-class?}]}); And also for the grid. Just add additional fields. The model will be detected during the definition time. Ext.define ('A', expand: 'Ext.data.Model', field: ['name']}); Ext.define ('B', {extension: 'a', field: ['age']}); console.log (B.getFields ());

django - Restrict access to a Class Based View based on the request user and view to be rendered -

рдпрд╣рд╛рдБ рджреГрд╢реНрдп рд╣реИ: рдкреНрд░реЛрдлрд╛рдЗрд▓ / models.py рдХреНрд▓рд╛рд╕ рдпреВрдЬрд╝рд░рдкреНрд░реЛрдлрд╝рд╛рдЗрд▓ (models.Model): user = models.OneToOneField (рдЙрдкрдпреЛрдЧрдХрд░реНрддрд╛, рдкреНрд░рд╛рдЗрдорд░реА_рдХреА = рд╕рдЪ) рдЬрдиреНрдорджрд┐рди = рдореЙрдбрд▓.рдбреЗрдЯрд╛рдЗрдордлрд┐рд▓реНрдб (рд░рд┐рдХреНрдд = рд╕рдЪ) def __unicode __ (рд╕реНрд╡): рд╡рд╛рдкрд╕реА рдпреВрдирд┐рдХреЛрдб (рд╕реНрд╡рдпрдВред рдпреВрдЬрд░) рд╢реНрд░реЗрдгреА рд╡рд┐рд╢реЗрд╖рдкреНрд░реЛрдлрд╝рд╛рдЗрд▓ (models.Model) : user = models.OneToOneField (рдЙрдкрдпреЛрдЧрдХрд░реНрддрд╛, primary_key = true) ... # рдЕрддрд┐рд░рд┐рдХреНрдд рдлрд╝реАрд▓реНрдб рдпрд╣рд╛рдБ def __unicode __ (рд╕реНрд╡рдпрдВ): рд╡рд╛рдкрд╕реА рдпреВрдирд┐рдХреЛрдб (рд╕реНрд╡ред рдКрд╕реНрдЯрд░) рд╡рд░реНрдЧ рд╡рд┐рд╢реЗрд╖рдкреНрд░реЛрдлрд╛рдЗрд▓ URL (models.Model): profile = models.OneToOneField (SpecialProfile, primary_key = рд╕рдЪ) ... # рдХреБрдЫ рдФрд░ рдпреВрдЖрд░рдПрд▓ рдореБрдЦрдкреГрд╖реНрда_рдЙрд░реНрд▓ = рдореЙрдбрд▓ред URLField (рд░рд┐рдХреНрдд = рд╕рдЪ) def __unicode __ (рд╕реНрд╡рдпрдВ): рд╡рд╛рдкрд╕реА рдпреВрдирд┐рдХреЛрдб (self.profile) рд╡рд░реНрдЧ рд╡рд┐рд╢реЗрд╖рдкреНрд░реЛрдлрд╛рдЗрд▓ рдЫрд╡рд┐рдпрд╛рдБ (models.Model): profile = models.OneToOneField (рд╡рд┐рд╢реЗрд╖рдкреНрд░реЛрдлрд╝рд╛рдЗрд▓, рдкреНрд░рд╛рдердорд┐рдХ_рдХреА = рд╕рдЪ =) img1 = models.ImageField (рд░рд┐рдХреНрдд = рд╕рдЪ, upload_to = 'рдкреНрд░реЛрдлрд╛рдЗрд▓ /') img2 = models.ImageField (рд░рд┐рдХреНрдд = рд╕рдЪ, upload_to = 'рдкреНрд░реЛрдлрд╛рдЗрд▓ /') img3 = models.ImageField (рд░рд┐рдХреНрдд = рд╕рдЪ, upload_to = ' рдкреНрд░реЛрдлрд╛рдЗрд▓ / ') def __unicode __ (рд╕реНрд╡рдпрдВ) : Publicic...

sql - How to use the exists operator properly in mysql? -

I want the EXISTS operator to list client names that do not have an order So, I have two tables (as shown below), a designated customer who holds the customer name and customer ID and the other designated orders that hold the customer ID as well as the order ID. I Customer ID using Customer, Select Customer ID, Order Order from Order Where Order ID & lt; & Gt; Customer ID); But the way I wanted it is not working. In a way you can do that EXISTS syntax privately, it makes more sense to me I think this query will work for you: Choose customer name, Customer ID to customer C, where no one is from (order from where order from C.CustomerId = O.CustomerId)

list in python behaviour -

I have a list that lists my_list mylist = [[]] * 5 Now I want to add an integer to 4 from the third list in my_list my_list [2] .append (4) When I print My_list, I see that integer 4 has been added to each list in my_list. & gt; & Gt; & Gt; My_list = [[]] * 5 & gt; & Gt; & Gt; My_list [2] .append (4) & gt; & Gt; & Gt; My_list [[4], [4], [4], [4], [4]] there is one Just the way to add 4 to the third list? Expected: [[], [], [4], [], []] Actual: [[4] ], [4], [4], [4], [4]] Find Answers my_list = [[]] I should do the move in xrange (5)]

python - Flask 500'ding and I'm not sure why -

I am trying to piece together a flask app to play with dragon and flask. It's got an avenger theme (how well is anyone watching that movie?!). Anyway, when I hit the / dashboard path, I get the benefit of 500 and I am not sure why take care to help me? Import flask.ext.sqlalchemy from flask, render_taglet, request, glitch, jsonify from flask import, SQLAlchemy app = flask (__name__) app.config.from_object ('config') db = SQLAlchemy (application) ## #################################### ## Category ticket (db.Model): id = db.Column (db.Integer, primary_key = true) email = db.Column (db.String (120), index = true) name = db.Column (Db.String (64), index = trojas) whatWentWrong = db.Column (db.String (5000)) def __repr __ (self): return "ticket" def __init __ (auto, email, name, whatWentWrong): self.email = email Self.name = name self.whatWentWrong = whatWentWrong ######################## @ app.r Oute ('/') @ app.route ('/ index') def activate_shi...

java - Hibernate - What primary key should I use in a one to many relationship without an ID on the child table -

In a very simple way, I am trying to create the following structure: Post ID (pk) name content table tag post_id (name to post id) the name so that a post can have several tags, but the tag does not have a primary ID. (The primary key so far will be the overall post_ID + name) Now what I want to know is that it is bad behavior (leaving the id column in the tag table) and what happens when using hibernate Potential value to use as the primary key for the tag table. In a normalized, every line in the database has a primary key; it should be post_id feels like a foreign key that should refer to the table of the post id primary key. I do not care much for this design; There may be many tags in a post; A tag can be applied to several posts, it should be several-to-many designs with the host table. Create a table post (id int do not auto_interment, text varchar (140), primary key ID); Create table tag (id int null auto_increment, name varchar (80) not tap, prima...

SQL Server 2000 - How to remove the hidden characters in the column? -

Image
I'm trying to remove a hidden letters from the varchar column, these hidden characters (I.e. period, location) was taken from a scan bar code and after the query was executed it is not visible in the result set. I have tried to use the script below, but it failed to delete the hidden characters (see attached screenshots for reference.) Any help is highly appreciated Img src = "https://i.stack.imgur.com/MvCzk.jpg" alt = "Enter image details here"> One thing that has worked for me is with columns, special characters, then data Paste in Notepad ++ then see & gt; Show Icons & gt; Show all characters, then I can copy the special characters of Notepad ++ in the copy () function in SQL in the second argument.

edit mysql table with php -

I'm missing something and I need some help! Creates a table with the code editing field below. When I edit the fields, this data sends the data to my editing page which will run an updated script. But when I press the update button on any line, it sends every record in the loop. How can I limit the record which I have chosen to update? Thank you for your help! $ sitequery = "SELECT *" like the WHERE address with the meter data '% $ site%' by the order 'alias + 0 "; $ Siteresult = mysqli_query ($ connection, $ sitecorruption); Echo "& form; form action = 'editmeter.php' method = 'get' & gt;"; $ Resultstring = '& lt; Table class = "table-table-hover"> gt; $ Resultstring = '& Lt; Tr & gt; '; $ Resultstring = '& Lt; Th & gt; Apartment & lt; / Th> '; $ resultstring = '& Lt; Th & gt; Address & lt; / Th> '; $ Resultstring = '& L...

When is using public fields acceptable Java -

I have a main square with thread pool, which is used by some other classes to perform actions on the database. goes . I currently get a great method to get the pool which works fine, but something looks weird Is there a situation where it is acceptable to use any public sector instead of gater / setter methods? Is there a situation where it is used to make use of public sector rather than gater / setter methods Is Acceptable for? The main reason is that the public sector is bad, they display the implementation in the outside world, there is an unwanted coupling; That is, classes which are more dependent on the details of implementation of other classes. To understand this, the code makes it difficult and it is difficult to change. And if the area is not the last , then you have to find the entire code-base to make sure that there is nothing "interference" with that field. (OK, IDE makes it easy ... but compare a public area with a private area with no setter...

c++ - How can i create a class that inherits the methods from FILE -

How do I increase the FILE class to use my methods? In other words, how can I use all the tasks that are provided with the default FILE object and still have the same functionality that imitates the actual functions? class myFile {file * _f; Public: Open MyFile (File * F) {/ * file here, then _f = f; * /}; Virtual ~ myFile () {/ * Close the file here}; // and add more methods here}

NoMethodError in Articles#edit in Ruby on Rails tutorial section 5.11 -

рдЗрд╕ рддрд░рд╣ рд╕реЗ рдмрд╛рд╣рд░ рдирд┐рдХрд▓реЗрдВ: Ubuntu 12.04 64 рдмрд┐рдЯ, рд░реБрдмреА 2.0.0, рд░реЗрд▓ 4.1.0 рдореИрдВ рдЖрдзрд┐рдХрд╛рд░рд┐рдХ рд░реБрдмреА рдСрди рд░реЗрд▓ рдЯреНрдпреВрдЯреЛрд░рд┐рдпрд▓ () рдХрд╛ рдкрд╛рд▓рди рдХрд░рдиреЗ рдХреА рдХреЛрд╢рд┐рд╢ рдХрд░ рд░рд╣рд╛ рд╣реВрдВ, рд▓реЗрдХрд┐рди рдореИрдВ рдзрд╛рд░рд╛ 5.11 рдореЗрдВ рдлрдВрд╕ рд░рд╣рд╛ рд╣реВрдВред рдореИрдВрдиреЗ рд▓реЛрдЧреЛрдВ рдХреЛ 5.12 рд╕реЗ рдкрд░реЗрд╢рд╛рди рдХрд┐рдпрд╛ рд╣реИ, рд▓реЗрдХрд┐рди 5.11 рдирд╣реАрдВ, рдЗрд╕рд▓рд┐рдП рдореБрдЭреЗ рд▓рдЧрд╛ рдХрд┐ рдореБрдЭреЗ рдкреВрдЫрдирд╛ рдЪрд╛рд╣рд┐рдПред рдпрд╣ рд╡рд╣ рд╣рд┐рд╕реНрд╕рд╛ рд╣реИ рдЬрд╣рд╛рдВ рд╡реЗ рдЖрдкрдХреЛ рдПрдХ рдлрд╝рд╛рдЗрд▓ рдХреЛ рд╕рдВрдкрд╛рджрд┐рдд рдХрд░рдиреЗ рдХрд╛ рддрд░реАрдХрд╛ рдмрддрд╛рддреЗ рд╣реИрдВред рдЕрдм, рдЬреИрд╕рд╛ рдХрд┐ рдЙрдиреНрд╣реЛрдВрдиреЗ рдХрд╣рд╛ рд╣реИ, рдореЗрд░реЗ edit.htmlред рдПрдЖрд░рдмреА рдлрд╝рд╛рдЗрд▓ рдХреЗ рд▓рд┐рдП: & lt; h1 & gt; рд╕рдВрдкрд╛рджрди рдЖрд▓реЗрдЦ & lt; / h1 & gt; & Lt;% = form_for: рдЖрд▓реЗрдЦ, url: articles_path (@article), рд╡рд┐рдзрд┐:: рдкреИрдЪ рдХрд░рдирд╛ | f | & Gt%; & Lt;% if @ article.errors.any? & Gt%; & Lt; div id = "error_explanation" & gt; & lt; h2 & gt; & lt;% = рдмрд╣реБрд╡рдЪрди (@ article.errors.count, "рддреНрд░реБрдЯрд┐")% & gt; рдЗрд╕ рд▓реЗрдЦ рдХреЛ рд╕рд╣реЗрдЬрдиреЗ рд╕реЗ рдкреНрд░рддрд┐рдмрдВрдзрд┐рдд рдХрд┐рдпрд╛ рдЧрдпрд╛: & lt; / h2 & gt; & LT; ul & gt; & lt;% @ article.errors.full_messages.each do | msg | | & Gt%; & Lt; li & gt; & lt;% = msg% & gt; & lt; / l...

d - multiplying a string by an integer returns integers? -

So I was trying to create asterisk pyramid using D. At first I saw that the combination seems impossible. Writing something like writeln ("foo" + "bar") will give you a syntax error. Instead, I tried to multiply the string like a dragon, which did not work with double quoted strings, But there is something strange with single quoted stars. If you type in import std.stdio; Zero main () {foreach (i; 0 .. 10) {article (i * '0'); }} This will return a bunch of integers. Can anyone explain why this happens? And to tell me how to add a string, it really will be helpful. Thank you! '0' is not a string, it is a character that uses ASCII encoding. The number is being multiplied with the integer ID of the encoding. For example, encoding for ASCII's 'A' is 65. import std.stdio; Int main () {writeln (cast ('a'); Written (10 * 'A'); Return 0; } This program will print 65 and 650 because the character is being...

Emacs mode line shows AC is on but no autocomplete is happening -

рдореИрдВрдиреЗ рддрд╛рдЬрд╛ рдЗрдВрд╕реНрдЯреЙрд▓ рдХрд┐рдпрд╛ рд╣реИ рд╕реНрд╡рддрдГ рдкреВрд░реНрдг рдкреЙрдкрдЕрдк рдФрд░ рдПрдПрд▓-рдПрдирдЖрд░рдкреАрдПрд▓ рдПрд▓реНрдкрд╛ рд╕реЗ рдЬрдм рдореИрдВ emacs рдореЗрдВ рдПрдХ рдХреНрд▓реЛрдЬрд╝рд░ рдмрдлрд░ рджрд░реНрдЬ рдХрд░рддрд╛ рд╣реВрдБ, рддреЛ рдПрд╕реА рдЗрдВрдЧрд┐рдд рдХрд░рддрд╛ рд╣реИ рдХрд┐ рд╕реНрд╡рддрдГ рдкреВрд░реНрдг рдЪрд╛рд▓реВ рд╣реИред рд▓реЗрдХрд┐рди рдмрдлрд░ рдореЗрдВ рдореИрдВ рдЬреЛ рднреА рд▓рд┐рдЦрддрд╛ рд╣реВрдВ рдпрд╛ рдХрд░рддрд╛ рд╣реВрдВ, рдореИрдВ рдХреБрдЫ рднреА рдХрд░рдиреЗ рдХреЗ рд▓рд┐рдП рд╕реНрд╡рдд: рдкреВрд░реНрдг рдирд╣реАрдВ рдорд┐рд▓ рд╕рдХрддрд╛ред I'v рдереЛрдбрд╝реА рджреЗрд░ рдХреЗ рд▓рд┐рдП рдЗрд╕ рд╕рдорд╕реНрдпрд╛ рдХрд╛ рдирд┐рд╡рд╛рд░рдг рдХрд░ рд░рд╣рд╛ рдерд╛, рдХрд┐рд╕реА рднреА рд╕рдВрдХреЗрдд? рдореЗрд░реЗ рдкрд╛рд╕ рдпрд╣ рднреА рдореЗрд░реЗ emacs рд╕реНрдЯрд╛рд░реНрдЯрдЕрдк рдореЗрдВ рд╣реИ: (рдРрдб-рдЯреВ-рд▓рд┐рд╕реНрдЯ 'рд▓реЛрдб-рдкрде' ~ / .emacs.d ") ('рд╕реНрд╡рдд: рдкреВрд░реНрдг-рдХреЙрдиреНрдлрд┐рдЧ' рдХреА рдЖрд╡рд╢реНрдпрдХрддрд╛ рд╣реИ) (рдПрд╕реА (рдПрдк-рд╣реБрдХ 'рд╕реАрдбрд░-рд░рд┐рдк-рдореЛрдб-рд╣реБрдХ' рдПрд╕реА-рдПрдирдЖрд░рдИрдкреА-рд╕реЗрдЯрдЕрдк) (рдПрдб-рд╣реБрдХ 'рд╕рд╛рдЗрдбрд░- рдореЛрдб-рд╣реБрдХ 'рдПрд╕реА-рдПрдирд░рд┐рдк-рд╕реЗрдЯрдЕрдк) (eval-after-load "auto-complete"' (рдРрдб-рдЯреВ-рд▓рд┐рд╕реНрдЯ 'рдПрд╕реА-рдореЛрдб' рд╕рд╛рдЗрдбрд░-рд░рд┐рдк-рдореЛрдб)) (рд╕реЗрдЯ рдЕрдк-рдСрдЯреЛ-рдкреВрд░реНрдг- рдкреВрд░рд╛-рд╕реЗ-рдмрд┐рдВрджреБ-рдлрд╝рдВрдХреНрд╢рди () (setq рдкреВрд░реНрдгрддрд╛-рдкрд░-рдмрд┐рдВрджреБ-рдлрд╝рдВрдХреНрд╢рдВрд╕ '(рд╕реНрд╡рдд: рдкреВрд░реНрдг))) (рдРрдб-рд╣реБрдХ' рдСрдЯреЛ-рдкреВрд░реНрдг-рдореЛрдб-рд╣реБрдХ 'рд╕реЗрдЯ-рдСрдЯреЛ-рдкреВрд░реНрдг-рдкреВрд░реНрдг-рдкреВрд░реНрдг-рдкрд░ -рдкреИрдВрдЯ-рдлрд╝рдВрдХреНрд╢рди) (рдРрдб-рд╣реБрдХ 'рд╕рд╛рдЗрдбрд░-рд░рд┐рдк-рдореЛрдб-рд╣реБрдХ' рд╕реЗрдЯ-рдСрдЯреЛ-рдкреВрд░реНрдг-рдХреЗ-рдкреВрд░рд╛-рдкреВрд░рд╛-рдмрд┐рдВрджреБ-рдлрд╝рдВрдХреНрд╢рди) (рдРрдб-рд╣реБрдХ 'рд╕рд╛рдЗрдбрд░-рдореЛрдб-рд╣реБрдХ' рд╕реЗрдЯ-рдСрдЯреЛ-рдкреВрд░реНрдг рдХреЛ...

c# - Type safety of indexed columns in an in-memory database -

Root of the problem: I want to design a database entry member indexing API, for which the model definition does not require repetition and maintenance. A fair level of security of type. Dry Out-Explanation: I have a basic memory database of people in the table, the full name of each person and the key to their favorite celebrity. Public class IMDB {public dictionary & lt; Int, person & gt; People; } Public class person {public string first name; Public string last name; Public int favorites celebrity id; } Now the celebrities want to be able to find their fans quickly through favorite celebrity ID . An index is clear, and thinking for the future, I created this interface: public class IMDB {public dictionary & lt; Int, person & gt; People; Private dictionary & lt; Object, dictionary & lt; int, int & gt; & Gt; _rowContents; Private dictionary & lt; Object, dictionary & lt; Int, list & lt; Int & gt; & Gt; & Gt; _rowI...

vb.net - vb net backgroundworker + progress bar -

I want to automatically create the progress bar which will pop up when I ran my program .. My program has 6 functions / sub which takes a considerable amount of time to complete the running query, it is input It is about 1-2 minutes for the backgroundworker to handle the thread and to combine it with the progress bar RunWorkerAsync Personal Sub ButtonX1_Click (ByVal Handle ButtonX1.Click) as the System.Object, as byVal e System.EventArgs. Click BackgroundWorker1.WorkerReportsProgress = True BackgroundWorker1.RunWorkerAsync () End Sub Do_work Private sub BackgroundWorker1_DoWork (ByVal as the object, byVal e System.ComponentModel.DoWorkEventArgs ) 100000000 i as integer = 0 to create_tree handles for BackgroundWorker1.DoWork () localtree () Localfrek () create_combination () showresult () if I mo d 10000000 again background 1. Report progress (i / 100) end if the next ending sub progress progress 1_ProgressChanged by Private sub background (ByVa...

php - Writting query in Yii -

рдЗрд╕ рд╕рд╡рд╛рд▓ рдХрд╛ рдкрд╣рд▓реЗ рд╕реЗ рд╣реА рдПрдХ рдЙрддреНрддрд░ рд╣реИ: 3 рдЬрд╡рд╛рдм рдореЗрд░реЗ рдкрд╛рд╕ рдирд┐рдореНрди рдкреНрд░рд╢реНрди рд╣реИрдВред ..рдФрд░ рдореМрдЬреВрджрд╛ рдХреНрд╡реЗрд░реА рдореЗрдВ рдХреБрдЫ рд╕рдВрдпреБрдХреНрдд рдЕрддрд┐рд░рд┐рдХреНрдд рд╕рдВрдпреБрдХреНрдд рдмрдпрд╛рдиреЛрдВ рдХреЛ рдЬреЛрдбрд╝рдирд╛ рдЪрд╛рд╣рддреЗ рд╣реИрдВ ... рдкреНрд▓реЗрди рдПрд╕рдХреНрдпреВрдПрд▓ рдХреНрд╡реЗрд░реА рдкреЛрд╕реНрдЯ рдХрд░рдирд╛ рддрд╛рдХрд┐ рдпрд╣ рдореБрдЭреЗ рдкрддрд╛ рдЪрд▓реЗ рдХрд┐ рдореИрдВ рд╡рд╛рд╕реНрддрд╡ рдореЗрдВ рдХреНрдпрд╛ рджреЗрдЦ рд░рд╣рд╛ рд╣реВрдВред / * рд╕рд╛рдзрд╛рд░рдг рдПрд╕рдХреНрдпреВрдПрд▓ рдХреНрд╡реЗрд░реА * / SELECT * рд╕реЗ Job_profile рдЙрдкрдпреЛрдЧрдХрд░реНрддрд╛ рдкрд░ рдЙрдкрдпреЛрдЧрдХрд░реНрддрд╛ рдХреЛ рдЬреБрдбрд╝реЗрдВ user.id = job_profile.user_id INNER рдкрд░ рд╢реНрд░реЗрдгреА рджрд░реНрдЬ рдХрд░реЗрдВ рд╢реНрд░реЗрдгреА.id = job_profile.category_id рдЬрд╣рд╛рдВ рд╢реНрд░реЗрдгреА_id = 1 рдФрд░ рдЕрдиреБрднрд╡ = 2 рдФрд░ key_skills '% php%' рдХреА рддрд░рд╣ LIMIT 0, 30 / * рд╕рд░рд▓ рдПрд╕рдХреНрдпреВрдПрд▓ рдХреНрд╡реЗрд░реА * / рдореИрдВрдиреЗ рдЕрднреА рддрдХ рдЪрд▓рдиреЗ рдХреА рдХреЛрд╢рд┐рд╢ рдХреА рд╣реИред рдФрд░ рдЕрдм рддрдХ рдЗрд╕рдХрд╛ рдХрд╛рдордХрд╛рдЬ рдареАрдХ рд╣реИ ... рд▓реЗрдХрд┐рди рдореБрдЭреЗ рдирд╣реАрдВ рдкрддрд╛ рдХрд┐ рд╕рдВрдпреБрдХреНрдд рд╡рдХреНрддрд╡реНрдп рдХреИрд╕реЗ рдЬреЛрдбрд╝рдирд╛ рд╣реИред $ results = SearchEmployee :: рдореЙрдбрд▓ () - & gt; findAll ("category_id =: рд╢реНрд░реЗрдгреА рдФрд░ key_skills рдЬреИрд╕реЗ: рдХреМрд╢рд▓ рдФрд░ рдЕрдиреБрднрд╡ =: рдЕрдиреБрднрд╡", рд╕рд░рдгреА ('ca рддрдХрдиреАрдХ '= & gt; $ рд╢реНрд░реЗрдгреА,' рдХреМрд╢рд▓ '= & gt;'% 'ред рдХреМрд╢рд▓'% ',' рдЕрдиреБрднрд╡ '= & gt; $ рдЕрдиреБрднрд╡)); рдореИрдВ рд╕рд┐рд░реНрдл рдЙрдкрд░реНрдпреБрдХреНрдд рдмрдпрд╛рди рд░рдЦрдирд╛ рдЪрд╛рд╣рддрд╛ рд╣реВ...

PHP - Maximum size allowed for each element of array -

In my program, I have 12 multi-dimensional arrays, which vary in size between 200-7000, in each cell of the array There is a float number with precision (such as 0.0000000000000123344) and these arrays pass values тАЛтАЛto each other for some calculations. At some time I get an error of memory loss in some arrays (I have changed all the configuration related to memory and This maximum stop It is). I am thinking that what is the maximum size to store float in a large array? Thank you. Finally I can find a solution I found that when the PHP collection is being loaded, There is no way to free it. Unset and gc_collect_cycles () are also not effective The only way to use the ** function ** on a separate section of code is in my case , I had a large script for loop , so I copied all of my code into the function, and I call the function in my loop. Every time the function quiets, the memory becomes free. You can test it once in your work by adding memory_get_usage () and see th...