Posts

Showing posts from August, 2012

flash - actionscript on/off sound not working properly -

Actually I have two buttons on / off. If I click on the button more than once, the sound is off The button does not work any more, so I can not stop the sound. Can someone help? Import flash.media.Sound; Import Flash. Media. Sound channel; Import flash.events.MouseEvent; Var mySound: Sound = New Classical_seend (); Var myChannel: SoundChannel = new soundchannel (); MyChannel.stop (); Soundon_btn.addEventListener (Mouse Event. Paste, Sound); Function soundon (Event: MouseEvent): Zero {myChannel = mySound.play (); } SoundOFF_btn.addEventListener (MouseEvent.CLICK, soundOFF); Function Voiceoff (Event: Mouse Event): Zero {myChannel.stop (); } Why is this happening because every time you call MySound .play () A new SoundChannel object is generated to play back the sound and that function comes back from the call. So if you say it twice, the most recent voice channel object is stored in your myChannel variable; However, any first soundchannel that was generated was lost be...

javascript - How to show console output on webpage? -

When I go to websites like codecademy or JSBin, I have notice that they allow you to see console output. how does it work? Just to clarify, let's assume that a user typed it in a text box console.log ('hello'); How do I create output on the actual web page and not just the browser's console? As Shahar has mentioned, the way to see output on the actual web page is in a DOM object For example, if we create a single output for output and make it output using jQuery: HTML: & lt; Div id = "output" & gt; & Lt; Div & gt; Javascript using JavaScript: // Your example output is var string = "Hello"; // Add output at the end of the output function () ($ ('# output'). Append (string + " & lt; br / & gt;);} above Example output will be output code in string and line break whenever whenever the outputToPage () function is called. Please note that you can use jQuery's .append ( ) To work...

java - Update parent size -

I have a function that should update the size of all the parents of a overall When children are added to do this, but this is not working here, my code is: Private zero growth size (composite child, overall parent) {parent.layout () ; Rectangle child's post = child Bats (); Rectangle parentPosition = parent.getBounds (); Int parentY = parent.to Display (parentPosition.width, parentPosition.height) .y; Initiative = Children Display (childposition.width, childposition.height) .y; If (childY> parentY) {int heightDifference = childY - parentY; Parent.setSize (parentPosition.width, parentPosition.height + heightDefence + 5); System.out.println ("guardian y:" + parentY + ", child y:" + childY); } And {return; } Parent.layout (); Parent.setVisible (true); If (! (Original example shell)) increase (size, parent, parent.getParent ()); }} If I extract the line in if -statement ( (parent, parent.getParent ()); ) more code main: public class exam {/ p...

python 2.7 - ttk Checkbutton select and readonly? -

I am using Python 2.7, is there a way to select / deselect a checkout in TT ?? Also read it as well? I am trying to display the option selected from a file. I understood myself, the right syntax would be something like this Self.name = ttte Whitelist (self-propaganda, text = 'mone') self Mon.state (['selected']) self.mon.grid (column = 0, row = 0) I've seen it on some sites, but stop their syntax, This is the right way to do it!

jquery - Anchor Links Changes Based on Site/Device Width? -

Therefore, on my website, I am using a smooth scroll and I will use an anchor ID in the context of scrolling points on the page I am using The anchor code is simple, like this: & lt; An id = "about" & gt; & Lt; / A & gt; And it works while using a regular href, though, I noticed that when I was on my phone, when the anchor links were pressed, it would give me a random point , And not on the exact location of the anchor on the page. It seems that this change in every device (for example, some above the anchor, some devices will fall down on the width) This is just a basic JavaScript, making anchor point Is there a way complete?

Undo git branch --track remotes/origin/X -

जीआईटी शाखा --सेट-अपस्ट्रीम का उपयोग इस संदेश में हुआ: द - सेट-अपस्ट्रीम झंडा नापसंद है और हटा दिया जाएगा। इसके बारे में सोचने और क्रिया-ऑब्जेक्ट को संभालने के बिना, मैंने तब कोशिश की - Git शाखा - ट्रैक रिमोट / मूल / एक्स इसके परिणामस्वरूप स्थानीय शाखा एक्स ट्रैक करने के लिए शाखा रिमोट / मूल / एक्स सेट अप किया गया अरे, मैं जो चाहता था वही नहीं। रिमोट को ट्रैक किया जाना था, ट्रैकिंग नहीं करना मैं इसे कैसे पूर्ववत कर सकता हूं और दूरस्थ शाखा को कुछ भी न ट्रैक करने के लिए सेट कर सकता हूं। तकनीकी रूप से आपके पास नहीं है कुछ भी करने के लिए: आपने remotes / origin / X नाम की एक नई स्थानीय शाखा बनाई है, जो बहुत भ्रमित है लेकिन वास्तव में मना नहीं है (यह शायद अस्वीकार कर दिया जाना चाहिए), और वह स्थानीय शाखा स्थानीय शाखा एक्स । (यदि आपने रंग चालू किया है, तो आप इसे git branch -a आउटपुट में देख सकते हैं: remotes / origin / एक्स काला हो जाएगा जबकि वास्तविक दूरदराज की शाखाएं लाल रंग में होंगी।) इस बिंदु पर करने के लिए सबसे सरल बात यह है कि, वह उस भ्रामक रूप से न...

How to automatically update connected parts of json with angularjs -

I have the next Jason structure: {"item": [{" {"Name": "item 1"}, {"name": "item 2"}, {"name": "item 3"}], "group": [{"name": "group 1", "item" : ["Item 1" "item 3", "item": {"item2", "item": ["item 2", "item 3"]}, {"name": "group 3", "item" : ["Item 1", "item 2"]}] } As you can see in your groups, I have the names of items I group There is no way in angular angles to automatically update objects, when it comes special Tom's name changes (what's the way to connect to particular parts of the json model?) Thanks. You can set a deep $ watch for each item in the item array. When the item changes, then repeat on the group item, and replace the old name with the new name: angular .forEach ($ scope.model.items, function (item) {$ sco...

extending @font-face declaration from external css file -

I am using a web-font that has been declared with @ font-face in the external CSS file. The font service is set up in such a way that I make the external CSS file source and then just use the font in my CSS. I can not source the font file in my own @ font-face definition Every time I use webfonts on my site, I add the same two style definitions. Therefore, my font usage always looks something like this: h2 {font-family: 'Knockout 26A'; -webkit-font-smoothing: antialiage; -Moz-OSX-font-smoothing: grayscale; } Each time I use fonts, I am unnecessarily feeling redundant if I use fonts; I want to have an @ font-face announcement from external files in my own CSS Is there any way to expand? Thank you! It is not possible to extend a @font-face declaration @ Font-face according to font-family and src descriptor is required or the declaration is invalid Unicode-category Font-variant Font-Feature-Settings Font-Stretch Font-Weight Font-style so ...

QML - How to change TextField font size -

How can I determine the font size of the TextField element in QML? Want to resize the placeholder text and also for the text that the user enters. I tried without any luck! Textfield {id: name_TextField; Horizontal Alliance: Text. Layout. Preferred Width: Parenchair Wideth * 0.90; Layout. Preview: 50 Style: TextFileStyle {font.pixel Size: 20 /} This does not seem to work either placeholder text: qsTr ("Your name is here")} You can use the style property to customize your TextField Are there. For example: textfield {style: TextFieldStyle} {font.pixel size: 14}} I tried to do it and it works like a magic

php - How to validate if a variable exist before inserting into table? -

itemprop = "text"> $ projectname is present if I can verify how to validate and prevent it from entering with a pop-up window "This project already exists"? I would like to stop any empty inserts. Please help! $ con = mysqli_connect ("127.0.0.1", "root", "password", "agent"); $ Idq = "SELECT id_project, project name from project, agentsFFO WHERE (agentsInfo.idagency = project.id_agent) and email = '$ _SESSION [email]'" or die (mysql_error ()); $ Result = mysqli_query ($ con, $ idq); $ Row_number = 1; While ($ line = $ result-> fetch_assoc ()) {$ id_agent = $ row ["id_agentid_agent"]; $ Id_project = $ row ["id_project"]; $ Projectname = $ row ["projectname"]; $ Id_project ++; $ ROW_NUMBER ++; } If ($ iss_post ['submit']) {if ($ projectname! = $ _POST ['projectname']) {$ sql = "Enter in project (id_project, projectname, id_agent) value (?,? ,? (C...

java - Adding MenuBar Space on Mac -

Image
On a PC, this issue does not arise, but I have Mac and Java menu bars usually appear on top left Gives the handheld screen of the screen for example (from the Apple Developers website): The blue Highlight menu is the same name as the main square in the Java program. I was thinking that how can I name my main law class as a place between two words instead of an underscore? "post-text" itemprop = "text"> I tried ... On the command line, -Xdock: name = "My app name" using System.setProperty ("com.apple.mrj.application.apple.menu.about.name", "My Mac App") ; after and after setting and look and feel within the main method only -Xdock: name work Done 10.9.4 has been tested using Java 8, so settings can be different for earlier versions of Java and OS combinations You can get a proper Mac .app You may also consider creating bundles, which allow you to set these properties through the plist file ... Take ...

java - Unable to test username/password with JDBC query -

I am trying to create a login form that connects to a SQL database. Here is my code: Private Zero CMD_Login ActionPerform (Java.av.te.Event.Ection EventEVT) {String SQL = "Inventor 1 to Sealette;"; Try {class.forName ("com.mysql.jdbc.Driver"); Connection conn = (connection); DriverManager.getConnection ("JDBC: mysql: // local host: 3306 / inventor", "root", "root"); Statement stmt = conn.createStatement (); Results set rs = stmt.executeQuery (SQL); Letter user = t1.getText (); String pass = new string (t2.getText ()); While (rs.next ()) {string user name = rs.getString ("user name"); String password = rs.getString ("password"); If (user.equals ("user name") & amp; amp; pass.equals ("password")) {new mainmenu (). SetVisible (true); }}} Hold (exception e) {JOptionPane.showMessageDialog (this is not "password and username match"); }} Although the user and password never match,...

linux - C-shell: How to create multiple arrays from a single line of standard input? -

Find a way to accomplish the following tasks using the C-shell (I can not use a different shell) Will be: is a program that extract multilateral factors from a large polynomial using the Galois field calculations. Output is a single line, and looks like something (ignore the actual value of numbers; I randomly selected them and they do not work mathematically): (0 1 4 6 7 8 11 12 13) = (0 1) ^ 3 * (0 4 5) * (0 2 4 6) ^ 4 * (0 2 3) ^ 2 Polynomial Mathematics The way that works, if any number increases to any number, then this aspect is not necessarily more than the value of the polynomial. Like multiplying by 1. What I need to do is to remove polynomial factors and to remove excessive factors. Using sed, I can change the expression above (0 1) ^ 3 * (0 4 5) * (0206) ^ 4 * (0 2 3) ^ 2 But I am unsure how to proceed. I want to move it up, input it into a C-shell script, and assign the following array: Array A = (0 1) array B = ( 0 5 5) I think the best route wi...

xslt - Need help on xsl/xquery desired ouput -

मेरी आवश्यकता नीचे दी गई है: इनपुट: - & LT; रूट & gt; & LT; नाम & gt; एबीसी & lt; / नाम & gt; & LT; नाम & gt; डीईएफ़ & lt; / नाम & gt; & LT; नाम & gt; एबीसी & lt; / नाम & gt; & LT; नाम & gt; एबीसी & lt; / नाम & gt; & LT; नाम & gt; डीईएफ़ & lt; / नाम & gt; & LT; नाम & gt; डीईएफ़ & lt; / नाम & gt; & Lt; / रूट & gt; आउटपुट: - मुझे नाम तत्व का एक्सएमएल बनाने की आवश्यकता है जो मान को पुन: प्रतीत नहीं करता & lt; root & gt; & LT; नाम & gt; एबीसी & lt; / नाम & gt; & LT; नाम & gt; डीईएफ़ & lt; / नाम & gt; & Lt; / रूट & gt; हम कुछ भी एक्सएसएल या एक्सक्लियर का उपयोग कर सकते हैं ... कृपया मुझे उसी पर मदद करें ... XSLT 2.0 में, & lt; xsl का उपयोग करें- प्रत्येक समूह का चयन करें = "/ * / नाम" समूह-दर = "।" & Gt; & Lt; xsl: copy-of select = "वर्तमान-समूह () [1]" / & gt; ...

asp.net - Why am I getting incorrect syntax near `username`? -

सार्वजनिक आंशिक वर्ग adduser: System.Web.UI.Page {SqlConnection con = new SqlConnection (@ "डेटा स्रोत = (लोकलडीबी) \ v11.0; अटैचडीबीफ़िलननाम = | डेटा डायरेक्टरी | \ डेटाबेस। एमडीएफ; एकीकृत सुरक्षा = सच "); SqlCommand सीएमडी = नया एसक्यूएल कॉमांड ("प्रवेश मूल्यों में डालें उपयोगकर्ता नाम = @ संयुक्त राष्ट्र, पासवर्ड = @ पी एस, सीक्रिरिटी_क्वी = @ एसएसी, एएन = @ उत्तर, यूजरर्ट = @ यूटीपी"); सुरक्षित शून्य पृष्ठ_ऑलोड (ऑब्जेक्ट प्रेषक, इवेंटएरग्स ई) {} सुरक्षित वॉएड बटन 2_Click (ऑब्जेक्ट प्रेषक, इवेंटएआरजीएस ई) {cmd.Connection = con; अगर (कॉन। स्टेट! = सिस्टम.डेटा.कनेक्शनस्टाट। ओपन) कॉन ओपन (); स्ट्रिंग un = txtusername.Text.Trim (); स्ट्रिंग ps = txtpass.Text.Trim (); स्ट्रिंग sq = txtseq.Text.Trim (); स्ट्रिंग उत्तर = टीटीटेंस। टेक्स्ट। रिम (); स्ट्रिंग ustp = DropDownList1.SelectedValue; cmd.Parameters.Clear (); Cmd.Parameters.AddWithValue ("un", un); Cmd.Parameters.AddWithValue ("ps", ps); Cmd.Parameters.AddWithValue ("वर्ग", वर्ग...

node.js - MongoDB _id is convert to ObjectID automatically, but sometime it is not. -

I am using a ring that is called to access mongoDB. Mongoscin is a simple wrapper around the Mongo DB Javascript API. But when I write to mongodibi, sometimes _id is converted to object id, for some time it is not so. Due to different behavior causes many problems when I have to compare _id. For example: In the company archive, the following document, "Manufacturer" has not been converted to ObjectID, but in "Client" the item is automatically converted into an object. & gt; ("53d4b452f5b25900005cb999"), ObjectId ("53d4b452f5b25900005cb99a")]} "" {"_ Id": ObjectId ("53d4b452f5b25900005cb999"), "name": "Customer company for 777 - update", "manufacturer": "53d4b452f5b25900005cb998", "SSN": "12-123-1234"} This is the nodejose code that I specified _id for the "creator" clientCompany.creator = req.session.user.company_id; This is...

Unable to run ruby script to git pull from github -

I have a Rail Server in Ubuntu 14.04 example and I host my code in github.com. To push the user's gitubon, I have set up a webhose for my app that listens to a POST call from Gitub and when a Ruby script tries to execute gitscript.rb, then all the correct payloads in POST Are there. Unfortunately the script does not pull a git and I'm stumped to run it completely any help would be appreciated. The code below is my code to listen to and runs this script, but the commands given in the script do not run, I need all the permissions for the Ruby script. / P> def webhooks push = JSON.parse (request.body.read) if some_condition_that_should_be_true logger.info "Yes Run ahead and drag" logger.info "Jiaiti bridge" command if `cd / Home / Server & amp; Amp; GIT Bridges & gt; & Gt; "Ruby / Home / Server / GIScriptRbb" logger.info "Last Command" and "logger.info Push and Render: json => {: Code => 'Webhocks Nice...

java - Servlet filter confusion, response redirect isn't happening -

I have an authentication filter that prevents users from browsing on any pages where you have to log in to them. Will be: public class authentication filter tool filter {private filter config FC; Private end string indexURL = "/index.xhtml"; Private Final String RegisterRuril = "/register/register.xhtml"; @ Override Public Zero Init (FilterConfig filterConfig) throws ServletException {this.fc = filterConfig; } @ Override Public Zero doFilter (ServletRequest request, ServletResponse response, FilterChain series) throws IOException, ServletException {HttpServletRequest req = (HttpServletRequest) request; HttpServletResponse resp = (HttpServletResponse) response; Http session session = req.getSession (); UserBean user = (UserBean) session.getAttribute ("userBean"); String request url = rect.getRequestURI (); System.out.println ("user" + user); If (user! = Null) {System.out.println ("username is" + user.getUsername ()); If (user.getU...

Azure security - lock account to prevent accidental object deletion -

I am trying to save and it is incredibly easy to create storage, VHDD and VMS The problem is, it's incredibly easy to remove them too! Is there any way to lock the storage containers, so that they can not be removed from the accident? Or is there anything else that can be forced to authenticate before removing the security feature? If not, then this is an incredible inspection of the platform - what if a session of the portal is hijacked - someone can move forward and delete everything without any authentication! For ezire storage - you are correct, once the blob / VHD has been removed / etc. Have gone permanently. An account key provides full control / access to one account, however, there are several tools you can use to reduce these possibilities: Support for taking snapshots; You can create a blob snapshot to protect the historical status of blops. While trying to remove a blob, additional steps should be taken to specify the user snapshot to be removed. It ca...

haskell - Error on comparing IO Int inside of a lambda -

I have a small section of code here that I want to use in a statement. Code getRandomInt :: (Int, Int) - & gt; IO Int getRandomInt (A, B) = GG & lt; - newStdGen return. Fst $ randomR (a, b) g then forward down ... if ((getRandomInt (0,1)) gt; & gt; ; = (\ X -> x == 1)) Under my understanding, it should be compiled at randomInt == 1 and one If the statement is usable within the statement; I get this error: word.hs: 30: 21: The actual type 'IOB' with the expected type 'Bull' could not be matched with expression: ((getRandomInt (0, 1)) & gt; & gt; = (\ x - & gt; x == 1)) In a STM of a 'do' block: if ((getRandomInt (0, 1)) gt; & gt; ; = (\ X -> X == 1)) Get the getendord: getWord $ len-1 and get the derANDindex: getWord $ len-1 in expression: do {if (getRandomInt (0, 1 ))> Gt;> = (\ x -> X == 1) getRandomVowel: (getWord $ len - 1) and get Rendendum alert A: Sorry for any clear misconceptions, I just yes...

Spring security get User object -

I have implemented user authentication through the Spring security framework and everything works well I can log in and log For example, for example, I can log in for example: string user name = (auth.getPrincipal) ()). GetUsername (); Now I have to get an object from the database from the database (I need the User ID and other user properties). How I have tried it yet: user user = (user) SecurityContextHolder.getContext (). GetAuthentication (). GetPrincipal (); Then I got an exception: The request process failed; Nested exception java.lang Class upstation: org.springframework.security.core.userdetails.User can not be entered on net.viralpatel.contact.model.User Here is a question - how do I user As the object can be obtained, how should I modify my classes UserDetailsServiceImpl and UserAssembler, any ideas? @Component @Transactional Public Class UserDetailsServiceImpl applies UserDetailsService {@Autowired Personal UserDAO userDAO; @ Owned Personal UserAss...

html - CSS Media Query Not Loading -

I am writing a static website and testing it locally. I have written a media question to change a layout slightly, so it's great to see on smartphone, with my media query being done to follow my target text and profile photo by each other. My problem is that when I load the HTML file on Chrome or Firefox and change the size of the window, the layout does not change and I can not decide how to fix it. Any help would be much appreciated. For my standard CSS For my standard CSS I have this (a small snippet): about # -text {/ * a div that contains paragraphs and a table * / Display: inline-block; Width: 50%; } # Profile-photo {/ * about- text div * / an img after ceiling closing: 4px solid # 1abc9c; Display: Inline; float right; Margin: 8% 0% 0% 0%; Max-width: 40%; } And then I have a media query and related CSS: @ media (minimum-device-width: 320px) and (max-device -food: 480 pixels) {# -in-text {/ paragraph and a div containing a table / / display: block; Width: 50%;...

c# - i am trying to store list item on click event using java script and acces it to another page for sql query, but i cant -

जेएस: & lt; script type = "text / javascript" & gt; $ (दस्तावेज़) .ready (फ़ंक्शन () {$ ("# लायसी ली")। क्लिक करें (फ़ंक्शन () {अलर्ट ($ (यह) .text ()); document.getElementById ('& lt;% = session [" लाइसेंस ""% = ">) = $ (this) .text ();});}); & Lt; / स्क्रिप्ट & gt; एक और पृष्ठ सीएस कोड: MySqlCommand सीएमडी = नया MySqlCommand ("नाम, संख्या, शहर का नाम, डीसी_एनाम से ab_db.dic जहां dic_name = @ dicnamep और city_name = 'सतारा' ", कॉन); cmd.Parameters.Add ( "@ dicnamep", MySqlDbType.String); Cmd.Parameters ["@ dicnamep"]। मान = सत्र ["उपाख्यान"]; Cmd.Parameters.Add ("@ लाइसेंसीप", MySqlDbType.String); Cmd.Parameters ["@licityp"]। मान = सत्र ["लाइसेंस"]; GlobalClass.adap = नया MySqlDataAdapter (सीएमडी); MySqlCommandBuilder bui = नया MySqlCommandBuilder (GlobalClass.adap); GlobalClass.dt = नया डेटाटाइल (); GlobalClass.adap.Fill (Global...

c# - Task.Factory.FromAsync with CancellationTokenSource -

I have the following line of code used by Network Stream to read asynchronous: BitsRed = wait job & lt; Int>. Factory.FromAsync (this.stream.BeginRead, this.stream.EndRead, buffer, 0, buffer, length, faucet); I want to support this cancellation. I think I can see, though I can not pass it in any way. Is it possible to cancel one Sensex () - construction work support? EDIT: I want to cancel a task that is already running. Gigi, Unfortunately, offsink means the nature that indicates that you only get TPL API (TPL =). In order to optimize asynchronous propagating, In short, TDSL's RedSync controls ASCIC behavior only, while when AASIC only wraps the behavior (but does not control it). Now there is a TPL specific construction since the cancellation, and since there is no control over the internal functioning of the Async system, therefore, to cancel the work clearly and to ensure that Not guaranteed that all resources are properly locked (This is why it was aba...

php - Turn off PEAR Errors -

I am using pear's mail_Queue and unfortunately there are many exclusion warnings (this is a normal SO topic). Is there any easier way to turn off peer errors altogether completely so that I can modify header information after calling mail_queue? This "errors" can be turned off as you said to yourself, it warns PHP To spread, and you can not just tell the PHP to output them. Use the following code before using it to silence warnings: error_reporting (error_porting () and ~ E_DEPRECATED & amp; ~ E_STRICT);

java - how to parse json with special key by Gson -

यह जेसन स्ट्रिंग है: {new: "", xx: "yy " , निजी स्ट्रिंग नया; कुंजी के लिए",, ...} जावा, अवैध है। कैसे मेरे डोमेन वर्ग को लिखना है? कैसे मेरे डोमेन वर्ग को लिखना है? चूंकि नया जावा में एक कीवर्ड है इसलिए आप इसका उपयोग नहीं कर सकते चर का नाम। आप एनोटेशन का उपयोग कर सकते हैं जो इंगित करता है कि इस सदस्य को उसके फील्ड नाम के रूप में प्रदान किया गया नाम के साथ JSON पर सीरियल किया जाना चाहिए। नमूना डोमेन वर्ग: वर्ग NewDetail {@ SerializedName (मान = "नया") निजी स्ट्रिंग newValue; निजी स्ट्रिंग xx; // मिलन & amp; सेटर}

No route to host. Github (composer) on ubuntu -

I am trying to load some dependencies with the composer. The composer fails on a github repo I can not even browse and by IP I can not go to the gitb. The DNS looks fine because I can solve github.com with nslookup. Any suggestions? Installing Composer Loading Treasures with Installing $ `Composer Package Information Dependency (Required-including Dev) - Installing Symphony / Routing (v2.5.2) : 100% Downloading: 100% Downloading: 100% Failed to download symphony / routing: "" Could not download file: Failed to open stream : There is no way to host Now download from Source Trying to - Install Symphony / Routing (v2.5.2) Cloning 24d5f003a794894513d67c888181ba8c3b8e0693 ` Your problem is not correlated with either Gitbo, Composer or PHP in any form. You got" no route to host "in plain English (github.com 192.30.252.129), that means this network There is a problem on the back and it can not be resolved with the client-side. General Connectivity Con...

mysql - Database update with PHP -

I am trying to add the ability to accept or reject reviews from the mysql database, and I do not know the problem this is. I tried and searched for 3 hours now, but I can not solve it. Code written briefly: if ($ line ['accept'] == 1) {echo "input type = \" checkbox \ "name = \" check [] \ "value = \ "0 \" & gt; Disapproved "; } Else {echo "& lt; input type = \" checkbox \ "name = \" check [] \ "value = \" 1 \ "& gt; accept; } If (isset ($ _ request) and isset ($ _ POST ['check']) {if (empty ($ _ POST ['test'])) {foreach ($ _ POST ['check'] $$ as key = & gt; $ value) {mysqli_query ($ con, "UPDATE feedback_rate SET accepts = $ value where id = $ key"); Echo "& lt; east & gt;"; Print_r ($ _post); Echo "& lt; east & gt;"; }}} Can someone help me and tell me what is the problem? Thank you very much! You id ...

python - Data migration using blobstore API fails -

I am migrating GCS files from S3 using the Blobstore API. I've created a South Data Migration Script to update the metadata for files: import google.appengine.ext from the google.appengine.api import migration (data migration) from the class of class blobstore: def forwards (self, orm): images = Orm ['core.image']. Objects to images images (all.): Blob_key = try blobstore.create_gs_key ( '/ gs / mybucket /' + image.name): except url = images.get_serving_url (Blob_key) images.ObjectNotFoundError: url = '' image .url = url image.save () ... When I try to run the script inside the AppEngine project: $ python manage .py migrate I am getting the error: traceback (most recent call final): File "& lt; console" , Line 1, & lt; Module & gt; File "/home/user/Downloads/google_appengine/google/appengine/api/blobstore/blobstorekpy", line 485, in create_gs_key RPC = create_gs_key_async (filename, RPC) file "/ home / use...

python - MySQLdb import error Enthought Canopy -

I am going to lose my mind on this, so any help is greatly appreciated. I am working with win8.1, and cleverly python 2.7.6 think that I am running from the command line. I had difficulties initely installing MySQLdb, but eventually worked with MySQL-Python-1.2.5.win-amd64-py2.7.exe installer. A few weeks later, there is nothing stupid that works in MySQLdb 1.2.4, so I use PIP to roll it back to 1.2.4 and now it's gone - anytime I program runs do I 'import error: No module named' MySQLdb I've tried PIP, easy-installation, installation sources, the installer again, to no avail. It is saying that it is established, it is included in CP / remove programs. When I installed PSI MySQL-Python: From the requirement already satisfied (using the upgrade to upgrade): MySQL- python in c: \ use rs \ laura \ appdata \ local \ enthought \ canopy \ user \ Lib \ site-packages is cleaning ... when I navigate to the directory name two mysqldb folders - mysqldb - it - constan...

javascript - JQuery UI Dialog Not Showing when using a separate JS File -

I'm new to JavaScript and JQuery and I want to create a basic social website. Although I was stuck on the login page I basically want to do website, when you click Login, there will be a dialog popup and say your password and username are not correct and two buttons are asked to sign up and cancel I understood That you can do that using JQuery Dialog UI but IM is struggling to do it. These are my HTML, Javascript and CSS pages. & lt ;! DOCTYPE html public "- // W3C // DTD HTML 4.01 // EN" & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; Login & lt; / Title & gt; & Lt; Link rel = "stylesheet" href = "css / login.css" & gt; & Lt ;! - Include jquery library - & gt; & Lt; Script src = "// ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> & Lt ;! - Include jquery ui library - & gt; & Lt; Script src = "// ajax.googleapis.com/ajax/l...

java - How can I clean merge my new version of code with old one without using `-f` flag? -

I have worked on local brakes in my computer; Apart from that, I have a public python. The only writer of the code, as you guessed, is what I want to do when I want to git push origin master , I get merge before pushing the error, That's why I always pull the original master and then add GIT. & Amp; Git commit -m "merged." However, this line of code renders my code useless. In other words, in my code, I , hash code and merge version of old and new code in the same file. Only writer, my gitab account does not recognize my past and always pushed me to merge the old version with the new version in the same file. Besides, add lines of > type in in your code. How do I clean merge , No like things or in the old one with no one in the old, my old version of code (not -f flag without using the flag? I am using Git Open in Windows.

c# - Random number distribution is uneven / non uniform -

I have seen a strange issue with the random number generation in C #, it seems that the pattern is too much Repeatedly often you expect. I am writing a system that generates the activation code, a series of 7 numbers (range 0-29). Mathematics must be 30 ^ 7 (22billion) in possible combinations of activation code. Based on this, 1 billion codes should not be expected to obtain a duplicate activation code before it is generated. Although my examination is underway, I start getting duplicate codes after about 60,000 repetitions, which is very surprising. I also tried to use RNGCryptoServiceProvider with the same results, I get duplicates at around 100,000 iterations. I really have to know whether it is the random number generation bug in the net / fixed zero main (string [] args) {random random ====== ================================================== === I New Random (); Random Activation Code (Rand, True); Console.Out.WriteLine (press "Enter"); Console.ReadLine (); ...

angularjs - Error: [ng:areq] Argument 'ProjectsController' is not a function, got undefined -

Why are my project controllers undefined? I get this error message from my browser console You can see that to see this plunker yourself. 'strict use'; Angular .module ( 'projectplanner', [ 'ui.router']) .config (function ($ stateProvider, $ urlRouterProvider) {$ urlRouterProvider.otherwise ( '/ projects'); $ stateProvider .state ( 'projects', {url '/ projects' views: { "menu": {template '! Start your projects'}, 'content': {templateUrl: "projects.html", controller 'ProjectsController'}}}) Kstate ( 'Projectskselected', {url: '/: ProjectId'}) Kstate ( 'Projectskselectedkdates', {url:' / Date /: date, views: {menu: {templateUrl: 'menu. html'}, 'content': {templateUrl: 'dateplanner.html', controller: 'DateplannerController'}}})}); 'Strict use'; Angular Modules ('Project Planner') Controller ('Projects Control...

java - Creating simple TicTacToe GUI game -

I am trying to create a simple tick-to-play game using the GUI. I have a button that shows the player's turn (when the button is pressed, it changes its text to 0 or 1 (drawing X or O)). Although I'm stuck with a problem here, I do not know that my testing within the MouseListener applies to all the JC component objectives (to expand my class tic tacca) and all 9 panels, which are gridlight 3,3) are filled with the same drawing ... Here is my tick ticket class public class TicTacToe JComponent {Private int ovalOrx = 0; Public TicTacToe () {super.setPreferredSize (new dimension (300,300)); } Public Zero Paint Component (Graphics G) {g.setColor (Color.BLACK); G.drawLine (0, 0, getWidth (), 0); // headline g.drawline (0, 0, getHeight ()); // left line g.drawline (0, 300, getWidth (), GetHeight ()); // bot line live getthought (getWidth), getHeight (), getWidth (), 0); // Right line if (ovalonex == 1) {g.setColor (Color.RED); G.drawLine (0,0,100,100); G.drawLine (0, 100, 1...

c# - Separating each 3 integer with dots or commas -

इस सवाल का पहले से ही एक उत्तर है: 4 जवाब कहें कि मेरे पास पूर्णांक है 200000 स्ट्रिंग से पार्स किया जाता है। मुझे प्रिंट करना परिणाम बनाना चाहते हैं, प्रत्येक 3 वर्ण को वापस से गिना जाता है ex : 200000 => 200,000 या 20000 => 20,000 तो मैं ऐसा कैसे कर सकता हूं? धन्यवाद अग्रिम में स्ट्रिंग फ़ॉर्मेटिंग पैटर्न का उपयोग करें: int संख्या = 200000; Console.WriteLine (number.ToString ( "###, ###"));

html - How do I make a Jquery loop of code repeat -

I am trying to create a button that makes the background color white to yellow, and when the button is again Clicks it white turns back, I'm using Jquery to achieve it, but I'm running into a problem while doing a loop function. I have the installation of JSFDial with a similar code that I have here below. ----- HTML ----- & lt; Html & gt; & Lt; Top & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div class = "button" & gt; & Lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt; ---- CSS ---- . Button {background-color: # 00ccff; Width: 250px; Height: 250px; Limit-Radius: 25%; Left: 0 pixels; Correct: 0 pixels; Margin-left: auto; Margin-right: auto; Margin-Top: 5 AM; } .body {background color: white; } ---- JQUERY ---- $ (document) .ready (function () {var click = false; (function loop Click ($ ('' button ''). {$ ('Button') (function () {$ ('body'). CSS (...

c# - How do I efficiently get data from a database as soon as it updates? -

Therefore, as soon as I see it there, I am trying to get data from the database. I am completing this by executing a timer on every second with a selected query that currently receives the desired information, but by doing so, this program becomes quite difficult every second, so it looks really bad. My question is, is there a better way to get data as a database update? Or maybe the way I am doing this is a better way of optimizing, so it does not make lagaspeaks in every second? Private Zero Update Timer_Tick (Object Sender, EventArgs e) {string mySQLConnection = "& lt; connection_string>"; // MySqlConnection connection left out for security purposes = New MySqlConnection (mySqlConnection); & Lt; String & gt; ID = new list & lt; String & gt; (); & Lt; String & gt; Source = new list & lt; String & gt; (); & Lt; String & gt; Message = new list & lt; String & gt; (); Use (connection) {connection.Open (); MySqComma...

php - Laravel cannot load the specific User model -

I have just uploaded a Laravel 4.1 application for Bluehost, and since I can not login into my app, It tells me that my user class is not present. I am using PSR-4 to load my specific directory / name space and in it I have created my own user class under Model Dyer. I have also changed the auth.config file that points to the user model in a specific model. I have checked the composer autoload_classmap that loads the original app / model / user class. I do not know it is wrong because it is similar in my local dev environment. Here's the funny thing that only the user model does not work, others declared in the same namespace are working as expected. It seems Laravel is not considered auth.config file. Can someone give hands with this?

html - Changing image size during mouse hover -

I am currently trying to create it so that if I measure it by li . I look like more than img that changes with an image that managed to exclude a code from a website: div class = "Profile" & gt; & Lt; Ul & gt; & Lt; Li class = "portrait lift" id = "one" align = "left" & gt; & Lt; A href = "../ project / profile1.html" & gt; & Lt; Img src = "../ project / image / portrait / img 1. jpg" width = "100" onosovar = "this.width = 150;" Onmouseout = "this.width = 100" align = "middle" alt = "img1" /> & Lt; / A & gt; Character 1 & lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Div & gt; What I do not understand is pointing to this . I think it points to img but it does not seem to work, how should I change the code when I type li or a instead of this can resize the image on hover? Thanks in advance. ...

django - Can't add a new field in migration: "column .. does not exist" -

I want to add a field to my model but I'm completely lost here. This is the model, the app name is called "profile": class profiles (model.model): user = model.oneoinfield (user, unique = true, null = true) alias = Model Chorphild (max _ lang = 75, null = tru) # New field description = model Model I did this Pyro manage.py migrate profiles --fake python manage.py migrate profile and then when I try to work with the model, I get an error Prog Trimming Error: Column Profile Profiles. Name does not exist Message I get when I try to migrate: "Migrate Nothing "and" nothing has changed " When I try to do a schemigration, a migration: /? ¿. The correct command will be: Python manage .py schemamigration & LT; App_name & gt; --Ao You have to write the name of app , not model .

Java get a current time in 24h format -

अब मुझे एक वर्तमान समय हो रहा है कैलेंडर c = Calendar.getInstance (); Int घंटे = सी.गेट (कैलेंडर.एचओआर); Int मिनट = सी.गेट (कैलेंडर.एमआईएनयूटीई); Int सेकंड = सी.गेट (कैलेंडर। SECOND); और घंटे हमेशा 12h प्रारूप में पुनर्प्राप्त होता है 24 घंटों के प्रारूप में वास्तविक घंटे प्राप्त करने के लिए मैं अपने कोड को कैसे बदल सकता / सकती हूं? इसका इस्तेमाल 24 -आप घड़ी। इंट घंटे = सी.गेट (कैलेंडर। HOUR_OF_DAY);

jsf 1.2 - JSF action not triggered -

Before I am trying to do a simple test before plunge into a major activity, but here's the place Where I was stuck. The test is to submit the JSF form, but the operation of the managed bean never starts. & lt; Html xmlns = "http://www.w3.org/1999/xhtml" xmlns: Ui = "http://java.sun.com/jsf/" "xmlns: h =" http: //java.sun. Com / jsf / html "xmlns: f =" http://java.sun.com/JSF/core "xmlns: ice =" http://www.icesoft.com/icefaces/component "& gt; & Lt; F: View & gt; & Lt; Top & gt; & Lt; Title & gt; ABC & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; H: form id = "test" & gt; & Lt; H: Input Text = "Demo" /> & Lt; H: command button type = "submit" value = "a button" action = "# {user.better}" instant = "true" /> & Lt; / H: form & gt; & Lt; / Body & gt; & Lt...

Linux - recommended apps to open a file -

In Ubuntu Linux, assume I'll create a simple text file. When I right click on that file, there is an option to open with other apps it will show a list of recycled applications which can open a text file. My question is how does the OS know which app can open that file? Edit : What do app developers need to do to make this candidate? I also have to say that OS verifies it in any way (the developer has specified the app to open a specific file format); For example, a video gaming application might refer to opening a text file itself, but when the user tries to use it, there will be a problem. Your app's .desktop file with your code in the other code Try to create in the dialog to open it. .desktop should look something like this [desktop entry] encoding = UTF-8 name = & lt; AppName & gt; Comment = Some details about the application Exec = & lt; AppName & gt; % U Terminal = true type = application icon = / usr / share / pixmaps / & lt...

Eclipse Auto Complete: Java 1.7 Generics Diamond -

I just advanced from Luna (Kepler) and I've seen some less (yet troubled) problems: To begin auto completion diamond, there is the absence of the possibility of generating diamonds for the specified generic "lt;>" For example, when I type: set & Lt; String & gt; MySet = new HashSet I hope this will auto-complete set String & gt; MySet = New Hashet & lt; & Gt; (); Instead of set String & gt; MySet = New Hashet & lt; String & gt; (); I am using JDK 1.7 and the compliance level is also set at 1.7. It is also very strange that when I hit STRG + space several times during auto-completion, until it reaches java-autocompletion again and then hits the hits, this expected diamond Saves you It looks like a bug for me. Is this bug "known" and there is no alternative solution for this issue? Nothing related to this topic could be found. You get the most code recommended plug-in unfortunately this plug-...

visual studio - Git Extensions custom SSH-Port -

I want to use the guit extension in Microsoft Visual Studio 2013. For safety reasons, I am using a custom SSH-port, instead of 2234, say 1234) which is the default I did some check in the internet and found that there are two ways to solve this problem: Setting port in .ssh / config for my host Ssh: Plan like this: ssh: //git@domain.com: {port} / {project path} The first one is not possible because I am using Windows Client-OS. So I tried to use ssh like this: ssh: //myusername@mydomain.com: 1234 / root / testapplication.git But it is not working . The guit is ignoring my custom ports 1234 and always connects at 22. I can use the above url with ssh-server running on port 22 on mydomain.com. Is it wrong here? I can not assume that it is not possible to use a custom SSAP port on the Windows client ...

c++ - set current index of qtableview base on some string -

Image
मेरे पास QTableView whith a QSqlqueryModel QSqlQueryModel db_model_.setQuery ("SELECT * FROM मुख्य WHERE प्रकार = '1' आदेश डीईएससी द्वारा आदेश"); tableView.setModel (& amp; db_model_); मुख्य के रूप में परिभाषित: Word (TEXT) | गणना (INTEGER) | प्रकार (INTEGER मैं उस आइटम के पाठ पर इस तालिका आधार की एक पंक्ति का चयन करना चाहता हूं जो उपयोगकर्ता किसी अन्य QListWidget से चयन करता है। मैंने setCurrentIndex की कोशिश की लेकिन यह QModelIndex स्वीकार करता है.मैं अपने Word कॉलम के माध्यम से मेरे tableView और उस listWidget की स्ट्रिंग ढूंढें और उसे QModelIndex शून्य (QListWidget :: * itemClicked) पर फ़ीड करें (QListWidgetItem * ) = & Amp; QListWidget :: itemClicked; कनेक्ट (& amp; सूची विड्ट, आइटम क्लिक किए गए, [& amp;] (QListWidgetItem * आइटम) {const QString & text = item- & gt; text (); // कैसे पूरी तरह से खोज शब्द कॉलम और पाठ ढूंढिए और इसका चयन करें ??}}; ध्यान दें कि मैं इन दो विजेट के लिए एक ही मॉडल का उपयो...

ios - Objective-C protocol in Swift - shows does not conform error -

The I'm trying to use Objective-C library (MWPhotoBrowser) into Swift app I my Swift Class MWPhotoBrowser Decompose the protocol by implementing the necessary methods. However, I keep the following error: "Type 'Photo Library' does not conform to protocol '' MWPhotoBrowserDelegate '' Does the Cocoa Protocol work properly? This problem has been encountered Here is the sample code: Class PhotoLibrary: UIImageView, MWPhotoBrowserDelegate {init () {super.init (frame: CGRectZero)} Func NumberOfPhotosInphotoBrowser (photoBrowser: MWPhotoBrowser!) - & gt; Int {return 0} func photoBrowser (photoBrowser: MWPhotoBrowser !, photoAtIndex index: Int) - & gt; MWPhoto! {Return nil}} Protocol Definition This way : @protocol MWPhotoBrowserDelegate & lt; NSObject & gt; - (NSInteger) numberoffofotoInfo browser: (MWPhotoBrowser *) photoBrowser; - (id & lt; MWPhoto & gt;) Photobraser: (MWPhotoBrowser *) Fotobraujhr Fotoattindeks: (...

scala.js - Why doesn't my sbt project dependency work? (insists on trying to fetch it remotely) -

I want to be a bridge for Scala.js and Snap.svg in a SBT project, but also demo code For the bridge, when demo / compile do the SBT, it starts to say that it can not solve the dependency. It seems that it is trying to reach the bridge as it is a well-publicized project, but it is fine, and it's compiled. What am I doing wrong? Deleting publishing-specific files has not changed. Directory structure: ├── build sbt ├── project │ ├── (PublishToBintray.scala) │ ├── build.properties │ ├── build.sbt │ ├── Project │ │ └── ... │ └─ ─ Target │ │ └── ... ├── (publication sbt) ├── scalajs_demos │ ├── main │ │ │ └── Scala │ │ └── watch. Scala │ └── target │ └── ... ├── source │ └── main │ └── scala │ └── org │ └── scales │ └── snapsg │ ├ ── SnapSwig Scolle │ └── package. Scala └── target └── ... build.sbt: scalaJSSettings name: = "Scala.js Sna P .svg "normalizedName: =" scalajs-snapsvg "version: =" 0.01 "organization: =" org.scala-lang.mod...

Convert from textbox string to double in C# -

इस सवाल का पहले से ही एक उत्तर है: 5 जवाब मैं एक सिस्टम कर रहा हूँ सी # पर और सबकुछ ठीक हो रहा है, लेकिन जब मैं एक टेक्स्ट बॉक्स वैल्यू को दोहरा कर बदलना चाहता हूँ, उदाहरण के लिए: जब मैं 123.40 में प्रवेश करता हूँ तो इसे डबल में बदलने का परिणाम 12340 है। यह मेरा कोड है: डबल। पाठ (टीएसटीपी। टेस्ट) और अगर मैं इसके साथ कोशिश करता हूं: कन्वर्ट। दोहराएं (txtPay.Text) परिणाम एक जैसा है ऐसा लगता है कि । आपके लोकेल में दशमलव विभाजक नहीं है - इसके बजाय, यह शायद , है, जिसका अर्थ है कि आपको 123,40 दर्ज करना होगा। > हालांकि, आप एक अपरिवर्तनीय संस्कृति का उपयोग एक डबल पार्स करने के लिए कर सकते हैं जहां । दशमलव विभाजक के रूप में उपयोग किया जाता है। System.Globalization का उपयोग कर; डबल। पेर्स ("4.0", संस्कृति इन्फोक। इन्विरिएन्ट कल्चर); इसके अलावा, यह अत्यधिक अनुशंसा की जाती है कि आप उपयोगकर्ता इनपुट को मान्य करने और अपवादों से बचने के लिए पार्स या कन्वर्ट के बजाय का उपयोग करें।

android - Dialog won't 're-show' after pressuing home key and relaunching app -

I have a 'Loading' dialog, which is basically a very simple print screen that is just a ' Load 'graphic while processing all my (Android) app loads Once all this is done, the dialogue is rejected. Everything works great except for one thing .... If the user presses the 'home' key, while the 'loading' dialog is displayed and then before all Something loads, I have a blank screen for everyone. It still works ... ie, after all, the blank screen is replaced by my app. So, why does not my dialogue be displayed again? I have confirmed that I am returning to my app before the dialogue ends, so I really can not understand it. At all other points in my game, this screen returns with absolutely because it was stopped and was immediately restarted. I am creating my own dialog so that this code is on creat () : load_dialog = new dialog (main activity. R. Style I.EmailBlack_NototelBar_Fullscreen); Load_dialog.setCancelable (wrong); Then I see t...

url redirection - Wordpress: Incomplete URL redirects to actual page -

Strange behavior for a WordPress site when I enter an incomplete URL, instead of getting a 404, I have a page whose URL starts with incomplete login For example, when I enter it in my browser:. I am redirecting to: Many pages are starting with the initial URL, but I would like the user to be given 404, or I will be able to install which pages are served with being able to recover. This behavior is for other pages with the same structure. I would appreciate any help / suggestions of beautiful mystified. "itemprop =" text "> This is standard WordPress behavior, and URL is part of canonicalisation process-there is one, but This is not yet made in a release. In the meantime, there is a solution that has been suggested in the ticket:. function remove_redirect_guess_404_permalink ($ REDIRECT_URL) {if (Is_404 ()) return false; Return $ redirect_url; } Add_filter ('redirect_canonical', 'remove_redirect_guess_404_permalink'); ... ...