Posts

Showing posts from June, 2012

javascript - SoundCloud Custom Player not working in FireFox? -

I am making a website for this guy and he wanted to install SoundCloud custom player. I did this and found that it works fine in Chrome, but it's not working in Firefox (I'm on 19.0.2) or IE (9.0.14). Here's the site: Is there something in my end that I am doing wrong? I get all the information set up here: Examples from that page work on Firefox, but I noticed that their examples use the previous version of jquery (1.4.2) , Where we are now at version 1.9.0 Any suggestions would be appreciated. Always open the console while you try to debug javascript. There is an error while trying to load some CSS files for you to start: received 404 (not found) this will not solve the problem , But you Second, you should set the encoding of the document: Character encoding of the HTML document was not declared. The document will present in some browser configurations with distorted text if the document contains letters outside the US-ASCII category, in the ...

c++ - How to wrap a raw pointer into a shared_ptr and prevent shared_ptr from deleting the object? -

I need to wrap a raw pointer in a shared_ptr to pass the function. The function does not return once in any reference to the input object. {MyClass i; Shared_ptr & lt; MyClass & gt; P (& amp; i); F (p); / / BAD: shared_ptr will erase I} How to prevent shared_ptr by removing the referenced object? As stated in the comments, type an empty deleter: #include & lt; Type_traits & gt; Template & lt; Typename T & gt; Struct empty_delete {empty_delete () / * noexcept * / {} template & lt; Typename u & gt; Empty_dellete (const_delete Examples of use: #include & lt; Iostream & gt; #include & lt; Memory & gt; Structure noise (noise () (std :: cout & lt; "living" one (new noise); std: : Shared_ptr & lt; noise & gt; b (new noise); std :: unique_ptr & lt; noisy, empty_delete & lt; noisy & gt; & gt; c (new noise); std :: shared_ptr & LT; noise & gt; D (new noise), empty_day ...

How to access a joystick/gamepad from Mono/C# in Linux? -

I am using C # on Debian, running Raspberry P on Robotics Project. I have got a PS3 DualShock controller made with OS so that it appears as a joystick device / dev / input / js0. Now I want to use DualShock joysticks and buttons from the C # code. It seems that it is more difficult than expected (or at least more ambiguous) - I have found the context of opentext, which appears in at least one coma, if not dead; And XNA, which can do this, but more than I need (and I worry about doing all the work on my RPI), as well as other small cover projects that are less well supported. Mono, C # and Linux once in a while, I'm a little bit on my head here ... as the easiest / best way to read the dualshock state in this environment. Any suggestions? An open source implementation of XNA is a cross-platform, and target Linux does. You can see how they do it.

ios - NSDecimalNumber decimalNumberWithString: ignores current locale -

प्रलेखन के अनुसार, [NSDecimalNumber दशमलव संख्याविथस्ट्रिंग:] को लोकेल दशमलव विभाजक का उपयोग करना चाहिए: क्या NSDecimalSeparator अवधि (जैसा कि संयुक्त राज्य अमेरिका में है, उदाहरण के लिए उपयोग किया जाता है) या अल्पविराम (जैसा कि प्रयोग किया जाता है, उदाहरण के लिए, फ़्रांस में) डिफ़ॉल्ट लोकेल पर निर्भर करता है। लेकिन जब मैं इसे करने की कोशिश करता हूं, तो यह कोड: NSLog (@ "% @", [NSDecimalNumber दशमलवसमूहविथः स्ट्रिंग: @ "100.1"]); एनएसएलॉग (@ "% @", [एनएसडीसीमलनम्बर दशमलवसमूहविथः स्ट्रिंग: @ "100,1" लोकेल: एनएसएलोकैले। कंटेंट लोकल]); देता है 100 100.1 ... आईओएस 5 और आईओएस 6 दोनों पर आउटपुट के रूप में मैंने स्वीडिश और फ्रेंच के साथ क्षेत्रीय सेटिंग्स के रूप में कोशिश की है क्योंकि इन दोनों देशों ने दशमलव विभाजक के रूप में अल्पविराम (,) का उपयोग किया है। क्या आउटपुट समान नहीं होना चाहिए? (मुझे पता है कि मैं व्यवहार करने के लिए [NSDecimalNumber दशमलव दशमलव संख्याविथस्ट्रेर्ड: लोकेल] का उपयोग कर सकता हूं, इसलिए यह प्रश्न...

c# - Role based controller access -

I am a new ASP.NET and asp.net MVC to show a user a page based on my role I am trying. Public Class Home Controller: [Controller {[Author (roles = "reviewer")] Public Action Index () {ViewBag. Title = "revivor"; See Return (); } [Author (roles = "user")) Public Performance Index () {Return View (); }} My code is up, it gives the correct meaning that it will not compile in such a way that I can not cave two extraordinary methods with the same name. But someone can point me in the right direction if they There should be different actions, then it makes more sense to give them names according to the role, such as: Public Sector Home Controller: Controller {[Authorized (Roles = "Reviewer ")] Public Career Reviewer () {ViewBag.Title =" Reviewer "; See Return (); } [Authorized (roles = "user")) Public action user () {return view (); }} If you can get them as one, then you can: Public Class Home Controller: Co...

asp.net mvc 4 - Model binding validation errors -

In my custom model verification, I have the following: Public override object bind modal (Controller contact controller console, ModelBindingContext binding content) {var repository = Dependency Resolver Present. GETService (IContactRepository); IContactRepository repo = Repository as IContactRepository; USRContact c = repo.GetContactByID (Convert.ToInt64 (Binding Content. Value Provider .Gate Value ("Contact ID"). Attempted Value)); C.FormalName = bindingContext.ValueProvider.GetValue ("formal name"). Attempts value; If (repo.IsValidFormalName (c.ContactID, c.FormalName)) {var results = binding contentbox. ValuProvider.GetValue (Compulsive Contintbox. ModelName); Binding Contest.ModelState Adoldmodel ("formal name", resources. Errors.formalnamename Yuan); Return Binding Consultant Model; } CpreredName = bindingContext.ValueProvider.GetValue ("preferred name"). Attempts value; C. Alias ​​= binding content box. Value provider Gate value (...

xcode - iOS Retractable Menu -

I am currently developing an app that has a music player so far in it a play, stop, and amp; A select song that shows the current song. Now, the player is always on the screen, I want to make it in the middle of the page as a button so that when the user clicks on it, the play, play, stop and select button button / icon will show the entire media player. When they click on that middle button, they will hide those icons. If someone can tell me in the right direction whether it is already a tutorial, or other discussions (I really can not find anyone) would be horrible! Note: I am not trying to create a popover menu that uses Facebook I'm not sure what effect your visions are, but I think you have already said - just hide them may do. One simple way to put those elements inside their own view. Use storyboard or xib file to hide your buttons and controls you will see in a scene. Then make a reference in your view controller in that scene. Control the call. @pro...

c# - Mono error format exception but not on windows -

Is there any reason that I get this error on mono but not on windows? Exception without action: System.FormatException: Invalid format string (String, String [], System.DormatProvider, System on System.DateTime.ParseExact .Glo balization.DateTimeStyles) & lt; 0x00127 & gt; 0x0004f & gt; System.DateTime.ParseExact (string, string, System.iformatProvider, System.Globa lization.DateTimeStyles) & lt; System.DateTime.ParseExact (string, string, system.formatprovider) & lt; 0x0001f> (Cover Dynamic-Method) on object.CallSite.Target (System.Runtime.CompilerServi ces.Closure, System.Runtime.CompilerServices.CallSite, System.Type, Object, String, s ystem.Globalization.DateTimeFormatInfo); 0x000f3> System.Type, Object, String, System.Globalization.DateTimeFormatInfo, Object & gt; System.Dynamic.UpdateDelegates.UpdateAndExecute4 & lt; (System.Runtime.CompilerServic es.CallSite, System.Type, object, string, System.Globalization.DateTimeFormatInfo) & lt; ...

java - Mass IllegalMonitorStateException on thread wait -

Whenever I call pauseThread () it always throws an illegal monitorstate exception. I have seen in the documentation that I with this part of the code synchronize (obj) {while not (& lt; condition does not ););) Obj.wait (); ... // Apply appropriate action for the condition} In this case, Ozam Ultimate will be runner while (serverteckhandler .pikblockdist cue () == faucet) {} But when obj .wait (); Should have been informed? Or when this condition is not correct, is this synchronized () {} code block consistently loop or it will require loop sometime within synchronized () {}? Edit: Does the synchronized () {} come in by running the method? Here's my class Public class serverTick-SavingsHolder running {Private Stable Thread Runner; / ** * When using some tools, block destruction creates a new thread to deal with logging. * @ The name of the ultimate yarn thread. * / Public serverTickSaveHandler (string thread name) {runner = new thread (this, thread name); }...

go - Why is this program producing output -

I'm new to google from GO here is a program in Buffered Channels: package main import "fmt" import "time" func main () {c: = make (chan int, 2) c & lt; - 1 fmt println (& lt; -c) time.Sleep (1000 * time.Millisecond) c & lt; - 2 fmt.Println (& lt; -c)} produces the product. But according to this it says: A buffer sends the channel block when the buffer is full . The block is received when buffer is empty. As it says when only the full program is completed in the c first statement? Your channel has a buffer size, you are pulling an int after inserting an int. Then you sleep and repeat the process. The channel will not block unless you try to insert a third intrate without dragging any intersection. The first two bricks will be buffer.

OpenCV GrabCut Algorithm example not working -

Image
Using Directly on C + + I, I am trying to implement a brookart algorithm in OpenCV and how to achieve it in a simple way. Unfortunately, it seems that the code is not working for me #include "opencv2 / opencv.hpp" #include & lt; Iostream & gt; Using namespace cv; using namespace std; Int main () {// Open second image mat image; Image = cv :: imread ("Picture / MangoAaGGGG"); // Define Rectangular CV :: Rectangle Rectangle (50,70, Fig. Cols-150, image.rows-180); CV :: mat result; // Partition Results (4 Possible Values): CV :: Mate BGMold, FGModel; // Model (Used internally) // Grabcoot Partition Service :: Grad Cut (Image, // Input Image Results, // Partition Results Rectangle, // Rectangle in which foreground BGModel, FGModel, // Model 1, // Number of iteration CV :: GC_INIT_WITH_RECT); //use rectangle cout & lt; & Lt; "Oaks payto" & lt; & Lt; Endl; // possible foreground cv :: get the pixels marked as comparison (result, cv :: ...

dynamics crm 2011 - Allow attaching files but not editing Note text -

I have a basic requirement to protect the integrity of the note text in my system; Specifically, once a note has been made, any CSR should be able to edit it (higher level, may be). Ideally, this should be unchanged once, but I permit CSR to edit it, if it is necessary; The big deal is that someone else should not have that access. Permission for the basic role that enables it is written permission of the note unit. By setting this to "no access" but still providing access to create and add, the user can still write new notes on any unit, which are present in the form of a subgrid, but they can not present an existing note Can not edit. However, there are two problems with this. First of all, I lose the "add new note" button in the ribbon, there is no big deal, but it forces the user to add notes using the subgroup inline editor. The big deal is that I lose the attached file button. CSR still needs to be able to attach files, even if they can not edit notes ...

php - Javascript HTML button click not working -

I have created a login system using HTML, Javascript, Ajax and PHP. I am trying to implement the logout function, what I have here: First there is a div in my HTML, which is not logged on to the site Welcomes anyone: & lt; Div id = "welcome" style = "postian: absolute; top: 0; float: true;" & Gt; Welcome to SIK! & Lt; / Div & gt; I have a JavaScript function, which is called when a user is logged in, or modifies the div in a specific user to say hi, and shows a logout button . function show_logged_in (success) {var is_logged_in = success; Var datastring = {"reg": invalid, "login": invalid, "is_logged_in": is_logged_in}; $ .jax ({type: "post", url: "php / class.ajax.php", data: datastring, datatype: 'jesnon', success: function (user name) {warning ("user shown") ; User = ('# welcome'). Html ('& lt; p & gt; Hi' + user + ' & lt; button ...

iphone - Suspend app option -

I have an app that I have and I have set it not to run in the background, but in a number People have to give an option, it starts again again from where they left and many people should start from the beginning only when they tap the home button and restart the app. How do I add an on / off switch to give the user options? My app is an educational / reference app with flashcards and pdfs. Thanks as described in a Make the setting bundle. Add your setting as Boolean value The way most people will use your app, consider this as default. Now launch the value of the settings and launch it accordingly. The settings will appear in the System Preferences app under the name of your app.

android - Preference Activity on Preference Click Listener -

I am creating a preference activity where most preferences codes will be executed in the list and modify shared sharing directly My preferences.xml file will look like this. Priority category Android: Title = "Connection" & gt; & Lt; Like android: id = "" @ + id / settings_connectToNewComputer Android: key = "connectToNewComputer" Android: android: summary = "currently connected to the": title = / & gt "Connect to a new computer"; & Lt; Like android: id = "@ + id / removeDevice" android: key = "removeDevice" android: summary = Remove whitelist tool of computer Android "" title = "remove the device from the computer" / & gt; & Lt; / PreferenceCategory & gt; & Lt; PreferenceCategory Android: Title = "About" & gt; & Lt; Android: Key = "About" Android: Summary = Android "About me and your people who made this app great": ti...

XPATH query optimization -

मेरे पास निम्न XML फ़ाइल है & lt; साइट & gt; & LT; लोग & gt; & Lt; व्यक्ति id = "person0" & gt; & LT; EMAILADDRESS & gt; 0@concordia.ca< / EMAILADDRESS & gt; & Lt; / व्यक्ति & gt; & Lt; व्यक्ति आईडी = "व्यक्ति 1" & gt; & LT; EMAILADDRESS & gt; 1@concordia.ca< / EMAILADDRESS & gt; & Lt; / व्यक्ति & gt; & Lt; व्यक्ति id = "person2" & gt; & LT; EMAILADDRESS & gt; 2@concordia.ca< / EMAILADDRESS & gt; & Lt; / व्यक्ति & gt; & Lt; / लोग & gt; & LT; closed_auctions & gt; & LT; closed_auction & gt; & LT; एनोटेशन & gt; 123 & lt; / एनोटेशन & gt; & Lt; विक्रेता व्यक्ति = "व्यक्ति 1" / & gt; & Lt; / closed_auction & gt; & LT; closed_auction & gt; & LT; एनोटेशन & gt; & lt; / एनोटेशन & gt; & Lt; विक्रेता व्यक्ति = "व्यक्ति 2" / & gt; & Lt; / close...

java - How to check multiple variables at once? -

Is it possible to check all to write a block of code, or all the objects / variables of a particular type For a certain specialty? (Without having to enter a statement for each) - then set it to right or false things. As you had 3 variables and ... if (a = 0 || b = 0 || c = 0) {// Set any variable to minus 4} The action described in the preform comment Or, for a complex example, 4 arraylists of type integer: from the list & lt; Integer & gt; Even new = ArrayList & LT; Integer & gt; (), // Positive also ints strange = new ArrayList & LT; Integer & gt; (), // positively weird ints negaodd = new ArrayList & lt; Integer & gt; () // Negatives also ints negaeven = new ArrayList & LT; Integer & gt; (); // Negative weird ints Anything like that: Whatever the test array is being if ("AnyArray" .isEmpty ()) {/ Tried = null; } So it is that if any of the arrays are being emptied, then instead of [], they will return...

How do I fix this rabbitmq/celery error? -

So I'm running celery on a number of servers with a clustered rabbitmack backend. Recently, whatever I do with celery is hanging indefinitely, and by checking the logs for the rabbit I get this ambiguous error message: = Error Report ==== 20-Mar-2013 :: 23:52:25 === Connection & lt; 0.15823.3 & gt ;, Channel 1 - soft error: between 'amqp_error, not_found,' Exchange 'i-6999569', a 'b-binding I-69995906' that came to 'Salehi' and 'Qatar' - 69995906 In 'vhost' celery ',' queue.bind '} is running rabbitmqctl list_bindings gives me this: # rabbitmqctl list_bindings -p sealary listing binding ... exchange vegetable quart celery [] celery exchange vegetable queue celery [] ... done What do I need to do to get rid of the error? Already already Rabbitmq Started, Rabbitmq has been restored, and removed and restored the cluster. I think I need to restore the binding in advance, but I do not know how to do rabb...

c - What is the identifier of typedef struct -

I came to learn the linked list. But, I am quite confused in many ways to declare linked lists with struct. This is a method, typingff structure noodt {int dataNum; Struct notepad * nextNode; } NODE; And this is another way type is not typed struct NODE {int dataNum; Struct NODE * nextNode; }; I'm curious, when we are announcing with typedef , I know that notettext to know the compiler Used for the straight notetag * next node; . But then, what is the real identifier of struct ? Notetag or NODE ? If this is notettext , then when is NODE ? You can alternatively assign a tag to a structure, such as struct nodetag or struct NODE . These tags (and union tags, and em tags) are in namespace separate from the common identifier. creates a nickname for typed f version struct nodetag : typed node tag { ...} NODE; Now the common identifier is a type of name in the namespace, which is synonym or surname for struct nodetag . > Note that you c...

qt - QTableView's cells are empty, but headers show up -

Image
text after "itemprop =" text "> I created a representative pretty copied from QT's spin box representative example and I'm trying to fill a QTableView . However, I am getting a strange problem where table headers are shown but cells are empty and can not be clicked address to representatives: DoubleSpinBoxDelegate :: DoubleSpinBoxDelegate (QObject * parent): QItemDelegate (parent) {} QWidget * DoubleSpinBoxDelegate: : createEditor (QWidget * parent, const QStyleOptionViewItem & amp; alternative, #include "double_spinbox_delegate.h" Const QModelIndex and index) const {QDoubleSpinBox * editor = new QDoubleSpinBox (guardian); Editor & gt; SetValue (0); // if (index.column () == 0) {// editor-> Set minimum (0); // editor-> Setmaxime (255); //} // else {// editor-> Set minimum (0); // editor-> Set (1); // Return Editor; } Zero DoubleSpinBoxDelegate :: setEditorData (QWidget * Editor, constant QModelIndex & Index) consta...

regex - grep in R with multiple numerical or defined variables -

उदाहरण डेटा ए & lt; -c (1,4,5,6) B & lt ; -सी (4,6,7,8) सी & lt; -c (6,9,1,2) डी & lt; -सी (5,6,7,3) ई & lt; -c (10,11,12,19 ) डीएफ एंड एलटी; -डेटा फ़्रेम (ए, बी, सी, डी, ई) colnames (डीएफ) & lt; -सी ("ए 4", "बी_1", "सी 2", "डी 2", "टेस्ट") एक & lt; - पिछले कॉलम में मिली स्थितियों के आधार पर मैं अपने डेटा को ड्रॉप करने के लिए (एपीए) बनाने के लिए grep का उपयोग करना चाहता हूं। डीएफ [ डीएफ $ टेस्ट & gt; 15, grep (दो, colnames (डीएफ)) & lt; -NA बस ठीक काम करता है डीएफ [डीएफ $ परीक्षण & gt; 15, grep (दो | एक, colnames (डीएफ))] & lt; -NA नहीं करता है और सिर्फ सांख्यिकीय डेटा थोड़ा अलग है डीएफ [डीएफ $ टेस्ट & gt; 15, grep (2, colnames (डीएफ))] & lt; -N यह ठीक काम करता है डीएफ [डीएफ $ टेस्ट & gt; 15, grep (2 | 1, colnames (DF))] & lt; -N यह नहीं है आदर्श रूप से मैं कई प्रति-परिभाषित चर के आधार पर डेटा ड्रॉप करने के लिए grep का उपयोग करने में सक्षम होना ...

glsl - OpenGL Getting Shader Attached to Program -

Is there a way to access the shader associated with a program? That is, given a program, I can do something like this: vertexShader = getVertexShaderFromProgram (program); (I would like to log the shader compilation status within my program, which validates my program, but I only refer to the program, not the shader.) To get the names of the shaders associated with the given program object. To get the type of shader (top, geometry, piece). On each shredder name to find out how long the source is. To get the source string for each attached shader. Edit : If you need all the shader names & amp; After step 2, you can stop.

ruby - Exclude certain gems from rubygems "gem update" command -

I have a gem that I maintain purely for personal use which is an old hosted on RubyGomas There is a name struggle with gems. Org. When I run gem update , the rubygems.org version is downloaded. I would like to keep this from happening. I know that I can clearly specify to include the gem with the gem update , but would I like to specify out? very sure you can not, but you GEM list - Can easily script a solution with local (on UNIX). Awk '{print $ 1}' | Grep -v YOUR_GEMNAME | Besides, Xargs GEM update In addition, I really impressed with the RubyGems source code many times I have seen, it probably will not be very difficult to add this feature. They can accept the pull request for this

c# - Entity Framework Code First Updating with Where Clause -

I am automatically using data from the currently logged user of my system. It provides me with a dynamic way to return data from the current user and does not reach other user data. I am updating one unit, I would like to do the same. I can get the unit from the database with FilteredSet and if the entity does not have the ID thrown an exception but I prefer to first load the unit and not only attach this one more update. So far, I have tried: Public Zero UpdateOwnable & LT; TEntity & gt; (TEntity unit) where TENTity:. Square, IEtity, IUserOwnable {var entityLocal = SetOwnable & LT; TEntity & gt; () Local.SingleOrDefault (D = & gt; DID == Unit ID); If (entityLocal == zero) {entityLocal = This. SetOwnable & lt; TEntity & gt; (). Attached (unit); } This.ChangeTracker.Entries & LT; TENTity & gt; () Single (d = & gt; d.Entity == entityLocal) .State = EntityState.Modified; } The problem is that the generated query does not contain a WHER...

linux kernel - do_gettimeofday() in Beaglebone giving wrong time -

I'm trying to measure the length of a square wave on the Angstrom OS running the beagle bone. I have written a kernel driver to register an ISR in which I am spending time in pulses, everything is working fine, but the time gap is being measured is completely wrong. I am using the do_gettimeofday () function to measure time when I do the same using the voting () function in the userspace program, I am able to get the right value (this is approximately 1007 us a 1000us wave ), But when I use the driver to measure the pulse, then I get the gap between 1923us. I do not know why the time interval in the kernel is more than the user location. I've attached my code below if someone can make a mistake in my program then I would be grateful. kernel ISR: static irqreturn_t ISR (int irq, zero * dev_id) {prev = c; Do_gettimeofday (& amp; c); Printer (KERN_ALERT "% ld", (c.tv_usec - prev.tv_usec)); Return IRQ_HANDLED; } Userspace handling: while (1) {prev = sta...

c# - How to remove validation focus in particular validation control -

I find that there is a higher priority than the recognition of the last line, I set the focus of the first line verification control Even when I focus on the code behind it want to disable some validation focus Even if I search for SetFocusOnError = "false" on some validation I still do not scroll to the top of the page Many times the test, more Time success, failed in some cases. I'm not sure whether anyone is doing the same at the production site at the same time. I have already used all my methods. I get one thing in the production site, when downward scrolls, press the button twice to focus on the top of the page. While not scrolling to the bottom of the page, it does not focus on the top of the page, sometimes it is lucky, in most cases it does not focus on the top of the page. Firefox and Internet Explorer using this method 100% success, Chrome sometimes fails and most of the time in this case However, I still have can not set the focus in the c...

When I move a repo on GitHub, how can I forward the old location? -

I took my repo from an individual account into an organization because more people are joining the project. But if people have the old URL, then I want them to be able to find the new location easily. How can I go about doing this? I know that Geithahb does not support forwarding. I had thought of making a trivial repo on the old name, in which a README.md was pointing to a new location, but I wonder if anyone is upset at the old location Will you have trouble? If SHA1 is unchanged in your transferred repo, then they can fork again again and see if they removed their old fork from their existing local clones and then throwing them again: If the name is unchanged, then the remote URL to git remote set-url for their own use) But if SHA1 is different, then those who have been offered at the old location Your place The committee must report to a local repo, which repo to a new fork will be a clone of the new organization.

java - Dealing with end of 'file' using BufferedReader.read() -

I have a client server program that should send the contents of the file as a string and The problem is that how to eliminate the loop in which the BufferedReader.read method is the I code: while ((c = in.read ())! = -1) {fw .write ((four) c); System.out.print ((four) c); } But since it uses sockets, it never reaches 1 until the socket closes. Unless I can not find an end segment to reach the loop, are there any special characters? went with: while ((line = in.readline ())! = Null & amp;; line.equals (BasicProtocol.SENDING_FILE_DONE)) where SENDING_FILE_DONE is a string that has been added at the end of the stream. There is not a good way to do this, but in this manner (I believe) when the data string should be. I have a client server program, which is the content of a file as a string Why? Bad idea It should be sent as a byte. Otherwise you are running the risk of data corruption. There is a problem deciding to end the loop with and BufferedReader.re...

Nested div inside django form -

I have a model form with output as.p () , now I want to add one or more Some fields need to be done with div to get different styling, I think because the forms come on page on Ajax calls, I can not loop on the form field in the template. How to do this You can loop through the form field. take a look at .

Compiled Javascript from CoffeeScript not working in IE8 -

I use CodeKit to compile JSK to my coffee script files. Most recently, I came to know that none of my compiled JS files from CoffeeScript in CodeKit is working more in IE8. I have tried to dig through IE Developer Tools and found that the error was being given in the following lines. this ["default"] = function () {return alert explorer.prototype.default.ed (_this, logic); }; ... ... this ["export"] = function () {ExportAuth.prototype.export.apply (_this, logic); }; I have looked at other function declarations and do all this this.functionName = function () {}; So it seems that the IE8 class does not like the job announcements with brackets []? Does it also make sense? For now, I just comment on the lines above and it worked fine. Is there anything with the latest update in the coffee script? I think the actual function declaration does not come from the problem, but Return to ExportAuth.prototype.export.apply (_this, argument); ...

Only jquery autocomplete download -

Image
I want to download the jquery autocomplete plugin but it does not allow me to download that file only, but jquery core With jquery status, widget etc. script But I do not want all these files because they have already been added to my project and are doing fine, so I do not want to break any existing current argument. When I tried to put all the script together with AutoComplete (full core.js), it works, but then my datepicker stopped working. I also tried to add only the full script part from the whole script, but it is not working, because I am using Jquery 1.7.2 and I myself Full 1.10.2 is found. Is there a way to get an auto-complete plugin or any plugin that we can get other plugins from outside writers? Actually my requirement is not completely complete, what I want is a text box that shows a list of options to select focus, anything like dropdown list options, But with this we do not even have our own value dropdown list arrow, I am working with the help of all this ...

node.js - Using node and restler for multipart form-data POST -

I am able to upload the file without using any restler.file in the Data section. Now I am trying to write a very small CSV data string, which I can not find the documentation for the data function, but reading the code I thought it was correct: restler .post ("http://posttestserver.com/post.php", {multicast: true, data: {"upload": restler.data ("people.csv", "text / csv", '384; 213; Status Update '), "Return URL": ""}}}). On ("full", function (data) {console.log (data);}); Unfortunately this is just hanging out and time will end. I tried to add EOF and other things to the third argument but I know that I am missing something that I have the data string is the exact same content that works for the file when I use restler.file. If I do not want to do it before posting then I will not have to write a CSV file. edit ---- above According to the comments of @Jooney for the given question, this probl...

mysql - Select An Optional Parent Row Using Same Table -

I am trying to select all rows from a table and in the same line about their parents The information also includes if they have a parent otherwise the original data should be blank. SELECT p.id, p.name, '0' AS Page_xist page from page P LEFT JOIN pages PP ON (PP) .page_id = p.parent) WHERE p.page_type = 3 ORDER I want a successful match for parents to add the following two columns to each line: "parent_id" and "parent_name" The end result of a page with parents looks like this: id = 2 name = "test" page_value = 0 parent_id = 1 parent_name = "abc" If the page does not have any parent, then Should look like this: id = 3 name = "other page" page_value = 0 parent_id = 0 parent_name = "" As you do LEFT JOIN in your code, use the nickname PP for parental information F, Code> If no parent is present In this way, the following questions will include fields from parents: SELECT p.id, P.n...

javascript - How to allow space in numeric regular expression? -

I want to validate the 'int' field with javascript regular expression. I am using this RE string var number = / ^ [0- 9] + $ / / This expression does not allow spaces in the text box. How can I create a regular expression that allows spaces in the text box? Add an optional location with: var number = / ^ \ S * [0- 9] + \ s * $ /;

c# - How to restrict storyboard to begin automatically in Windows 8 store app? -

I am using two storyboards, left balls (image) and right direction, at the tap event of the left button I want to go in the direction of the balls and the right button tap in the left direction, the balls should be taken in the right direction. It is working correctly on tapping the left and right buttons, but the loading app starts automatically on the storyboard and moves one step to one place without tapping the balls. How do I start the storyboard automatically? This is my first storyboard to move the balls in the left direction: & lt; EventTrigger & gt; & Lt; BeginStoryboard & gt; & Lt; Storyboard x: name = "balderbybyte" & gt; & Lt; Double animation storyboard TargetName = "balltrans" storyboard. TargetProperty = "translationX" period = "0: 0: 0.5" by = "- 40" FillBehavior = "holdand"> & Lt; DoubleAnimation.EasingFunction & gt; & Lt; Elastic Is Oscillation = "0...

java - Programme a Toggle button to Set Widget update time -

@Override सार्वजनिक शून्य पर onClick (देखें arg0) {// TODO स्वत: उत्पन्न विधि स्टब अगर (Tb.isChecked ()) {Android.appwidget.AppWidgetManager.ACTION_APPWIDGET_UPDATE.equals ("120000"); } Else {android.appwidget.AppWidgetManager.ACTION_APPWIDGET_UPDATE.equals ("300000"); }} मैं एक विजेट विकसित कर रहा हूं जिसमें हर 2 मिनट और 30 मिनट अपडेट प्राप्त करने का विकल्प होता है। इसलिए मैंने समय के बीच स्विच करने के लिए एक टॉगल बटन बनाया था। कोड का उपरोक्त ब्लॉक मैं टीबी के रूप में जाना जाता टॉगल बटन को सक्षम करने के लिए उपयोग कर रहा हूं। ऐप त्रुटियों को नहीं दिखा रहा है, लेकिन यह काम नहीं करता है। कोई मेरी त्रुटियों के लिए कोड की जांच कर सकता है। यह कोड कुछ भी सेट नहीं कर रहा है। आप यह देखने के लिए ACTION_APPWIDGET_UPDATE जांच रहे हैं कि क्या यह "120000" या "300000" के बराबर है ACTION_APPWIDGET_UPDATE एक स्ट्रिंग स्थिरता है जो हमेशा के बराबर होता है। इसलिए, प्रत्येक पंक्तियां कुछ भी नहीं करती हैं और बराबर () परीक्षा का मूल्यांकन नहीं क...

python - Using GDAL directly on windows -

Is there any possibility of using GDAL directly via MSDOSOS? Most of the instructions I have seen need to install a python and its binding. Will it be possible to use GDAL after establishing an executable installation MSI? Need any other configuration steps? Thanks Yes, GDAL is supported on Microsoft Windows. However, there are many different ways to set it up; View Options on Using Simple Way To install the minimum GDAL command line setup, use the installer's advanced mode to select a package: gdal . Since some GDAL command line utilities are Python scripts, it will install its own version of Python as a dependency. After installation, use the OSGO Shell from the Start menu for a command prompt.

iphone - iOS MPMoviePlayerController playing audio in background -

I have MPMoviePlayerController which should play audio of video in the background and should be controlled by playing multitasking / control control. - (zero) startBackgroundStreaming {[[ UIApplication sharedApplication] beginReceivingRemoteControlEvents]; [Self-made first responder]; NSError * activationError = Zero; AVAUDIO SESSION * AUDIO SESSION = [AVIDIO SASH Shared Instance]; [AudioSession SetDigitNet: Evolutionary Character Playback Error: & amp; activation error;]; [Audio session set active: yes error: & amp; activation error]; } } The app icon appears in the Multitasking Play / Pause Bar, but these buttons do not respond. Thank you! The missing pieces of the puzzle are getting you handling remote control events. (Zero) Remote Control Reakwete Event: (UIIvent *) Event by applying the method can be done in your application representative. In its simplest form, it will appear: - (zero) remoteControlReceivedWithEvent: (UIEvent *) event {if (event.ty...

PHP to JavaScript - has time passed -

I am trying to figure out how to do the following in JavaScript: If (Stratotime ($ row ['last_active']) (time () - (30))} {// update ...} $ line [ 'Last_active' Any idea? Use the library: Var then = new xdate ('& lt;? = $ Row [' last_active ']? & Gt;'); var now = new XDate (); days_between = now.diffDays (then); There is also You can also query ... SELECT last_active, DATEDIFF (CURDATE ( ), In Mm_activ) AS_last_active or: select last_active, DATEDIFF (stringent (last, active)> 30 is_inactive DATEDIFF () may need to be used on DATE () : DATEDIFF (CURDATEF) DATE (last_active))

arrays - Use PHP Gettext without having to install locales -

I see alternatives to internationalizing an open source project: Gatetext, which suggests to all, is apparently necessary to use locals to "install on your system" on this PHP manual, which actually reflects my position. It also asks about the same problem, it is not suitable for an open source project because I can not believe that end users have proper locale installed on their system. Apart from this, it is very strange that you only need to install locale to use the stars that you have translated. (IMO). ZdroSlate is also sometimes recommended in favor of Gatetext, but I am not using Zend Framework, so I do not think this is an option for me Some people have said that you can divide it by the Zend Framework, but I will not have any clue about how. If someone can tell me what file I need (I've downloaded a tarball of the Zend Framework), then I would be open to using Zend_Translate. This is what I am doing, but this is not ideal because: It's too...

opengl - Generate one texture makes shader not work -

शदर कोड: # एक्सटेंशन GL_ARB_texture_rectangle: वर्दी सक्षम करें नमूना 2 डी टेक्क्स; वर्दी सैंपलर 2डीटेक्ट टेक 1; वर्दी यूनिट नमूना_प्रकार; शून्य मुख्य (शून्य) {vec4 col; अगर (sampler_type == 0) {// इस लाइन की टिप्पणी - काम करता है col = texture2D (tex0, gl_TexCoord [0] .st); // col = texture2D (tex0, gl_TexCoord [0] .st / vec2 (400, 300)); } अन्य {col = texture2DRect (tex1, gl_TexCoord [0] .st); } Gl_FragColor = col; } मुख्य कोड: शून्य ड्यूक्वाड (int x, int y, int w, int h, float s, फ्लोट टी) {glBegin (GL_QUADS); GlTexCoord2f (0, 0); GlVertex2f (x, y); GlTexCoord2f (एस, 0); GlVertex2f (x + w, y); GlTexCoord2f (एस, टी); GlVertex2f (x + w, y + h); GlTexCoord2f (0, टी); GlVertex2f (x, y + h); glEnd (); } // ----------------------------------------------- --------------- शून्य सेटअप () {shader.setupShaderFromFile (GL_FRAGMENT_SHADER, "test.frag"); shader.linkProgram (); img.loadImage ( "1.jpg"); // डीफ़ॉल्ट GL_TEXTURE_RECTANGLE GLuint में लोड किया गया; ...

How to execute external php from Javascript? -

I'm working on a JavaScript application, and I've organized things to follow: A table is displayed on the screen (the table is coming from a MySQL database) The user decides, to delete a line in the table, the icon (Not a form M) Click an external php file to & lt; & Lt; Tabledelete.php? Codetokill = 'XXXXXX' & gt; & Gt; But I can not go back to the main page, and likewise Can someone give me some suggestions? Am I using the wrong approach? TY for all Edit For the test I have suggested the following code as implemented: JAVASCRIPT (This is a funcion called a button bay with the onclick option ) Function Fn_deleterow (numrig, cod, descr) {messaggio = "is deciso di eliminare (" + numrig + ")" + cod + "-" + descr; Var scalata = confirmation (mesagajio); If (scelta) {document.write ('ok delete') $ .ajax ({url: "PHPTest.php", type: "POST"}) document.write ('Happy ...

c# - Download a file from the depot -

P4 कॉमांड सेमी = नया P4 कॉमांड (ps, "sync", true, String.Format ("{0} / ... ", डेपथथ)); पी 4 कॉमांड परिणाम परिणाम = सेमी.रन (); यदि (परिणाम! = नल) कंसोल। Wrightite ("कोई समस्या नहीं"); टैग किए गए ऑब्जेक्ट सूची सूचीबद्ध किए गए = नए टैग किए गए ऑब्जेक्टसूची (); Listfiledown = (results.TaggedOutput); विदेशी मुद्रा (टैग किया गया ओब्जेक्ट ऑब्ज़ इन लिस्टफाइलडाउन) {Console.WriteLine ("कोई समस्या नहीं"); } मुझे डिपो से मेरे कार्यक्षेत्र में एक फाइल डाउनलोड करना है, इसलिए यदि मैं कमांड को टैगआउट आउट निकालता है, तो उसके लिए कोई समाधान है? 'ऑब्जेक्ट संदर्भ किसी ऑब्जेक्ट के एक उदाहरण के लिए सेट नहीं है' तो, आपकी कमांड में एक रिक्त परिणाम प्राप्त हैं.टैगडऑप्टपुट । मैं डिबगर के तहत चलाता हूं, cm.Run () के बाद तोड़ता हूं, और परिणाम को देखने के लिए देखता हूं कि इसमें कुछ प्रकार की त्रुटि विवरण शामिल हैं। इसे नकारने से, जांचें कि आपका आदेश सही है - उदाहरण के लिए, वह deppath सही पथ को इंगित करता है।

google adwords - Developer Token approval? -

How long does it take for Google to approve GAdwords Developer Token? I sent an email to the Google AdWords API Team in the month of January. But they have not heard them yet. What should I do? I will definitely follow up, a link in the series can be remembered. However, this may take several months - it did for me, yet despite repeated marketing to the marketing team for Google, the company I work for spends millions of dollars every year on AdWords, Which does not necessarily make us "big fish" ... but if you are a lone developer then it may take longer.

bitmap - android picture download -

I return a bitmap object according to a URL, and download photo code: url = new URL (image URLSTR); URL Connection Connection = url.openConnection (); Conn.setDoInput (true); Conn.connect (); InputStream = conn.getInputStream (); Bitmap bitmap = bitmapfenderDecodedStream (in); In.close Then I save it to sdcard. OK to save the image The problem now is that Image A is being downloaded to access this URL. But it now shows another and B photo in the SDCard. How to solve this problem ¼ ?? You can identify images by hash codes. Not a good solution for the demo, Private bitmap getBitmap (string URL) {string filename = string.value (); File f = new file (cache directory, filename); // bitmap b = decodfile (s) from SD cache; If (b! = Null) return b; // Try the Web {bitmap bitmap = null; InputStream = New URL (url) .openstream (); OutputStream OS = New FileOutputStream (f); CopyStream (is, OS); Os.close (); Bitmap = decodefile (f); Return bitmap; } Hold (Exception pre) {ex....

eclipse - maven goals, compiling and deploying to a server -

I am using Eclipse to manage a Maven project. I have a special plugin in POM of this project that creates a file during the generated-ressources phase: & Lt; Version & gt; 3.2.1 & lt; / Edition & gt; & Lt; Hanging & gt; & Lt; Execution & gt; & Lt; Step & gt; Generated resources & lt; / Step & gt; & Lt; Goals & gt; & Lt; Goal & gt; Acceleo-Collection & lt; / Target & gt; & Lt; / Targets & gt; & Lt; / Execution & gt; & Lt; / Hanging & gt; & Lt; / Plugin & gt; I have linked this plugin target to get the lifecycle to execute it during the compilation collection: & Lt; Version & gt; 1.0.0 & lt; / Edition & gt; & Lt; Configuration & gt; & Lt; LifecycleMappingMetadata & gt; & Lt; PluginExecutions & gt; & Lt; PluginExecution & gt; & Lt; PluginExecutionFilter & gt; & Lt; Group & gt; Org.eclipse.acceleo & lt; ...

mysql - Jquery Autocomplete - how to send all data to php file while autocomplete -

मुझे इस ट्यूटोरियल पर एक समस्या है। मेरे पास 2 इनपुट हैं: & lt; इनपुट आईडी = "आरए" प्रकार = "टेक्स्ट" स्वतः पूर्णांक = "बंद" & gt; & Lt; इनपुट आईडी = "आरबी" प्रकार = "लेख" स्वत: पूर्ण = "बंद" & gt; मैं एक .php फ़ाइल में 2 इनपुट का डेटा भेजना चाहता हूं, जबकि एक इनपुट इस तरह स्वत: पूर्ण या दौरान टाइप किया जा रहा है: $ ('#ra) .autocomplete (' data.php? मोड = आरए & amp; आरबी = '+ $ (' # आरबी ')। Val (), {width: 200, अधिकतम: 5}); $ ('# आरबी)। आटो कॉम्प्लेटे (' डेटा.php? मोड = आरबी & amp; ra = '+ $ (' # ra ')। Val (), {width: 200, अधिकतम: 5}); लेकिन यह काम नहीं कर रहा है, मैं यह काम कैसे कर सकता हूं? धन्यवाद। आपके चयनकर्ता गलत हैं। इसे आज़माएं $ ('# ra')। Autocomplete ('data.php? मोड = आरए & amp; आरबी =' + ('# आरबी')। Val (), {width: 200, अधिकतम: 5}) ; $ ('# आरबी')। स्वत: पूर्ण ('data.php? मोड = आरबी ...

spectral - generate white noise in matlab interval [-1 1] -

इस सवाल का पहले से ही एक उत्तर है: 5 जवाब मैं बनाना चाहूंगा या [1 -1] की श्रेणी में सफेद शोर उत्पन्न करते हैं, लेकिन मुझे नहीं पता कि यह कैसे करना है। पसंद की मेरी प्रोग्रामिंग भाषा है matlab जहाँ तक मुझे पता है कि randn नामक एक फ़ंक्शन मौजूद है और जिसका नाम wgn (सफेद गाऊसी शोर) है उदाहरण के लिए, मैं निम्नलिखित समीकरण उत्पन्न करना चाहता हूं: x (t) = 20 * sin (2 * pi * f1 * t) + 30 * कॉस (2 * pi * f2 * t) + ए 3 * सफेद शोर जहां ए 3 = आयाम और सफेद शोर श्रेणी में है [-1 -1] कृपया मेरी मदद करें और इसे कैसे करें I मेरा भ्रम सफेद शोर से संबंधित है, दूसरों के बारे में नहीं, मान लें कि टी 1 से 100 तक बदल रहा है। सफेद शोर एक फ्लैट (स्थिर) शक्ति वर्णक्रमीय घनत्व के साथ एक यादृच्छिक संकेत है। इसके लिए आप उपयोग कर सकते हैं अंतराल में सफेद शोर प्राप्त करने के लिए [-1] आप केवल अपनी अभिव्यक्ति में जोड़ सकते हैं white_noise = (रैंड (1, टी) * 2-1) ।

dataset - c# DataTable, deleting added row -

There is a problem with datasets in C #, which represents the structure and data of DB in the SDF file. I'm doing some automated testing with DB, so I should add some lines to the table, test and remove rows attached to the table. My code is: adapter.Fill (set); Line1 = data light. Add (empty, "name1", file.readlibets (@ "images \ photo1.jpg")); Line2 = dataable everyday. Add (empty, "name2", file.readlibets (@ "images \ photo2.jpg")); Adapter.Update (set); ... PERFORMING TEST ... ADAPTER. Fill (set); Row1.Delete (); Row2.Delete (); Adapter.Update (set); But the added rows are still in the base. I tried to use figure Cry. Remove (line1); Datatable.Rows.Remove (line2); But this is the reason for the no-as-line-exception due to incorrect "number" values ​​in line 1 and row 2, which is different from actual auto-integrated values ​​in DB. How can I get the actual value of numbers when I am adding a line? ...

php - Parse error: syntax error, unexpected T_VARIABLE on line 110 -

I am trying to get the user ID from the user database which is the data user name I have from the session so To select the name, the ID is stored in the id and it is trusted The code I have is that it stores the uploaded image string but users only have permission to upload the image. When the image is loaded, I want to store the user id with the string in the photo table with the string, to know which user has added the photo // setting veraables $ imagestring = $ _FILES ["file"] ["name"]; $ Filetype = $ _FILES ["file"] ["type"]; $ Session name = $ _SESSION ['username']; $ Description = $ _POST ['desc']; // user id $ myquery = mysql_query ("Select user id where username = '$ sessionusername'"); $ Line = mysql_fetch_array ($ query); // Dosage mysql_connect ("$ host", "$ username", "$ password") insert or die ("can not connect"); Mysql_select_db ("$ db_name...

symfony - Symfony2 embedded form and left join entities -

I find two organizations that work properly using a theory, which is left, the problem occurs When I try to edit using a form and the details are empty (no row was found). How do I ensure that description.producted product.productid? Object (Test \ AdminBundle \ unit / product) is populated with # 245 (5) [["Manufacturer": Protected] = & gt; String (4) "8989" ["Product": Protected] = & gt; String (12) "Test Test" ["Value": Protected] = & gt; String (4) "9, 9 5" ["Gruped": Protected] = & gt; String (2) "72" ["Description": Protected] = & gt; Object (Test \ AdminBundle \ unit \ description) # 417 (3) {["Manufacturer": Protected] = & gt; NULL ["Description": protected] = & gt; String (4) "qweq fdasd"}} class product {/ ** * @Assert \ notBlank (groups = {"edit"}) * @Assert \ Range (min = "100", max = "99999"...