Posts

Showing posts from July, 2013

json - How do I resolve this exception? Is the f# version wrong? What version library of FSharp.Data do I need installed? -

Now I have FSharp.Data.2.0.5 installed but my code throws this exception in which version this method And it does not matter how my F # (which version f #) is targeted? Error: Error: Command Fail: Uncontrolled Exception: System. Mix method exception: method not found: 'FSharp.Da ta JasonValuue FSHRP.data Jason Valleau (System String, Microsoft FSARP.core.FS Harpoption '1)'. On MyFile.main (string [] args)

cordova - Phonegap 3.4 on Android 4.4 with pre-populated SQLite database -

I have a hybrid Android / PhoneGap application that is with PhoneGrap version 2.5, which uses the pre-generated SQLite database The application is copied to the "/data/data///app_database/file__0/0000000000000001.db" location from the asset folder on the installation database. The database is not working on Android 4.4. I am trying to upgrade PhoneGep 3.4, but, while the app is compiled, it is still the same issue. Do I need to use the Cordova-SQL plugin ()? Does it work with pre-populated databases and if this happens - where is the database stored? In addition, I got another plug-in - but he said that there are problems with Android 4.4. Thanks for Olga 4.4+, you can type " / app_webview / database / file__0 / 1 " with the path " / app_database / File__0 / 0000000000000001.db ". In my app, it works on Android 4.4.2.

hibernate validator - can @Email and spring custom validation coexists? -

I have to validate the email and password when creating an account using web services. I am using Spring Rest Controller and are planning to use @Email (Hibernate Vector) annotation for e-mail verification. For password verification, I have to write the custom verifier by implementing the Verifier interface. @xml Arrayment Element Public Class Account Tools SerialJobile {@Email (Message = AccountErrorcode.ACACACACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA); Private string password; For a password writing your validation @Autowired Private PasswordViditor passwordLegal; @InitBinder Private Zero initBinder (WebDataBinder Binder) {binder.setValidator (passwordValidator); } It seems that the two can not be together. When I try to authenticate the email ID spring passwordValidator calls but fails to validate email I expect failure due to wrong email ID when I disable custom verifier, I get the required error message is. It seems I'm missing something, do I need to do something to...

entity framework - Code First Migration -

I have read the first code migration from MSDN. But if my Database Team data base changes, if any one / update some fields from a table, which is to migrate the changes? I mean my code is the first model update that changes? Please help me. I'm using unit framework 6.1. I did not understand your problem completely because the real purpose of migration is to update the updated database field or table Used to be . All you need to do is Launch: Add-Migration Now Off Migration and Updates-Database. In package manager console. As you can see in the migration named "Name Off Migration", you have 2 different ways: From above and below you can update your database with that change (up) or back ( Below) can come.

python - Why does collections.MutableSet not bestow an update method? -

When implementing a class that works like a set, any collections.MutableSet , Which will provide new classes with many mixing methods, if you implement those methods they want (otherwise, some methods of a set can be applied in the context of other methods. To protect you from this boredom, just go to collections.MutableSet and friends , ___ __ , add , disconnect and mixed methods Inherited set methods and clear , pop , delete , __ ior __ , __ iand __ , __ ixor __ , and __ isub __ (and, Just to make it clear that the update "invariable set methods, set The mixin methods are: __L____ , __lit___ , __eq __ , ___ __ , __ gt __ , __ gi __ , __ and __ , __ or __ , __sub___ , __ xor __ , and isdisjoint The set refers to an unchanging set, which is not a naturally update .) Why between these methods is the update not? I am surprised - even unrecognized - even set is in this method, but does not archive .set . For...

python - How do I pass a parent id as an fk to child object's ModelForm using generic class-based views in Django? -

I am trying to use the Django Generic Class-Based Views to create the CRUD interface for two model databases. I have a working CRUD interface for parents model, and I am trying to start working on the child. For stability with other Django instances, keep parents and children as a book. What is the easiest way to allow users to add books to books? In HTML words, I think I want to create a link on the author details page that contains the author's ID, that ID has been preset on the book form, and after that the book form processing Use that ID as the PK of that book But I do not understand how to use the DJGengo. I have read, and, each of which answers a little different question. models.py Category Author (models.Model): Name = Model. Serifield (max_long = 100) class book (model.model): author = model.Argink's (author) title = model.carfield (max_long = 500) view Py forms.py class BookForm (forms.Modelform): class meta: model = book urls.py url ...

php - Filtering WebSocket Connections (Reject Unknown Clients) -

I'm running a PHP websitet server (feedback on PHP + ratchet) and I have my own client application Will communicate with you. The problem is that any WebSocket Client application can connect to this server. I am looking for some ideas to apply a method to reject connections from all customers, but my client-application? Was there an idea that I had to include an additional key field in the handshake header? I understand that a hacker can easily regenerate, but many people do not bother doing it.

javascript - "active" class somehow being removed from ".caret" -

Even if in my mouseover function, it is clearly class active to when you Double click on the "dropdown" (once to show the menu; to hide once) and when the "dropdown" is empty and the dropdown menu is hidden, make it "graded" still has its own cursor on "oars", fails to change the caret color (gray turn), which is strange. The only way to improve this is by & lt; Span & gt; element and then re-enter it, at that point, it should be done in brown form However, I would like to change it in brown in every circumstance, unless the span element is being placed above and The dropdown is hidden. The problem still seems to be that the active class is being removed from anywhere, whenever "dropdown" is clicked twice, but I do not know where that is. How does anyone have to fix this? HTML: & lt; Div class = "navbar navbar-inverse navbar-fixed-top" & gt; & Lt; Div class = "container" ...

fasterxml - JAXB Class - XML not getting created as expected -

I am using the fast XML-JEXAB (2.3) module to create an XML, but it seems that XMLN is not reading annotation while creating XML. I have a prefix given below in my package-info @ javax.xml.bind.annotation.XmlN (prefix = "bla" ..... "Itemprop =" text "> Jackson does not use package annotation for some, so when JAXB annotations are supported (when using the JAXB annotation module), no Annotation is not read from package-info.java . The module is based on legacy (you can add all the annotations to super-classes, and they are visible to the sub-type). You can add a mix-annotation (or regular annotation) to the superclass, and it will work.

Java Goose not extracting content on Android -

I am trying to set up a small Android application that removes content from the web page using the Swan library. Since the library is written in Scala, so I am using .jar I found. The problem is, when I try to remove content from a page, it does not give anything. I can successfully create a article object using a URL, but values ​​of the object (title, domain, top image, etc.) are all null I try to use different URLs That, to see if the problem was separated on one website, but it does not seem like this. I use the Goose gooseDir = context.getCacheDir (); Configuration config = new configuration (); Config.setLocalStoragePath (gooseDir.getAbsolutePath ()); Swan Hans = New Swan (ConfiG); And then I can only make it like the article example: article article = swan.extractContent (url) ; Any advice? Actually you can not use it because of the inconveniences of the swan library on Android, but you can not use my Android version You can use: It's almost t...

html - How to apply background-color to the whole area of class -

I want to change the background color of a whole square area (class = "test_detail"), but only color text Changed behind I use Rail 4. index.html.erb . . & Lt;% @ calendar.each do | C | & Gt%; . . . & Lt; Separate class = "span7" & gt; & Lt; Span class = "test_detail" & gt; & Lt;% If c.day? & Gt%; & Lt;% = c.day% & gt; & Lt;% else% & gt; XXX & lt;% end% & gt; & Lt; Br> Xxx & lt;% = link_to "xxx", 'http: // xxx'% & gt; & Lt; / Span & gt; & Lt; / One side & gt; . . . & Lt;% end% & gt; custom.css.scss .test_detail {font-size: 12px; Color: Gray; Background color: orange; } font size and colors work, but background color does not work. This is because you are using span and not div - This is the default inline, so in this case you will only see the background color changes behind the text.

javascript - Dynatable - records are appended to previous list each time the page number is changed -

Image
I am trying to use Dynatable to create a styled list of records from a local JSON dataset. In Dynatable documantions, an example of a stylish list uses the reader function to obtain a record from the DOM, and uses the Writer to generate records in the page. I need to use the local dataset instead of the reader function. Here's the text: var localJSON = '[{"caption": " myCaption1 ", "thumbnail": "& lt ; IG src = \ '../... Picture / test.jpg \' / & gt; "}, '+' {" caption ":" myCaption1 ", "Thumbnail": "& lt; img src = \ '../ images / test.jpg \' / & gt; }, '+' {"Caption": " myCaption1 ", "thumbnail": " myCaption1 ", "thumbnail": " + Record.caption + '& lt; / Div & gt; & Lt; / Li & gt; '; Retracted; } $ ('# SampleUIList'). Dynatable ({dataset: {perPageDefault: 4...

update php mysql query -

I try to update my query and it seems that there is no problem and there is no error but I Do not know why the themes on the sidebar are not updated, please help me (I'm sure there is no problem with other code pages) 30); Foreign currency ($ field_windth_lambjes $ fieldname = & gt; $ maxlength) {if (strlen (trim (mysqli_real_escape_string ($ connection, $ _POST [$ field name])))) $ $ maxlength) {$ errors [] = $ field name; }} If (empty ($ errors)) {$ id = mysqli_real_escape_string ($ connection, $ _GET ['subj']); $ Menu_name = mysqli_real_escape_string ($ connection, $ _POST ['menu_name']); $ Position = mysqli_real_escape_string ($ connection, $ _POST ['status']); $ View = mysqli_real_escape_string ($ connection, $ _POST ['visible']); $ Query = "Update topics SET menu_name = '{$ menu_name}' status = {$ position} visible = {$ view} WHERE id = {$ id}"; $ Result = mysqli_query ($ connection, $ query); } Else {Echo "Er...

c++ - Running a game loop inside a Qt window -

How do I play a game loop inside a QT window without creating a new thread? My "Runframe" method looks like this: Zero GameInventory :: Runframe () {// Update Game Time. GameTime.Update (); TimeTime + game timeTime time () - the last time; Last time = time of the game time (); While (Timehighand> = TargetTimeStep) {update (); TimeBehind - = targetTimeStep; } Draw (); SwapBuffers (); } As you can see, it is running as if it is called every event loop. Is there any way that I can get a method in my window which can be called every event loop? Or should I renew my loop around the timer in QT? I think QTimer is a work and relatively simple measure. It uses the multimedia timer (if necessary) to get the resolution of milliseconds, so it is possible for the game loop.

android - Send SMS with out saving it in sent item in kitkat -

I am developing an application that needs to send an SMS. I am using SmsManager.SendTextMessage and SmsManager .sendMultipartTextMessage, both are working well, the main problem is sent message will be saved on sent item (only in KitKat, older version SS does not save), but I do not have to save the message. My app is the default message app, what should I do to stop saving SMS in KitKat? Here's my code: try {SmsManager smsManager = SmsManager.getDefault (); String body = "test"; String to = "5556"; ArrayList & LT; String & gt; Parts = smsManager.divideMessage (body); SmsManager.sendMultipartTextMessage (to, blank, part, blank, empty); } Hold (exception before) {toast. Maketext (this, former. Messages), toast. LNNGH_LANG). Show (); }

Polymer core-selector - using the selected data -

I am creating a custom element to read files in a given directory (such as INI from / config directory Files) and display them as a wrapped list in a main selector then the user can then select a file from the list. All the work, except reading selected data, seems to be a junky code: & lt; Div & gt; & Lt; Core-selector on-core-active = {{getFile selected]} selected = "" & gt; & Lt; Template repeat = "{{files in files}}" & gt; & Lt; RNC-commandfilelist & gt; & Lt; Span class = "rnc-fileindex" & gt; {{File.index}} & lt; / Span & gt; & Lt; Span class = "rnc-filename" & gt; {{File.commandFileName}} & lt; / Span & gt; & Lt; / RNC-commandfilelist & gt; & Lt; / Template & gt; & Lt; / Core-selector & gt; & Lt; / Div & gt; & Lt; / Template & gt; & Lt; Script & gt; Polymer ('rnc-getscaffoldini', {matchstring: ".ini", con...

html - Replicate nullreference exception in textbox after clicking Add button -

After clicking the button I am trying to replicate NullReferenceException in textbox. Is there a way or device to use it, so that when I am on the page, I will change the textbox ID so that it will remove nullreferenceexchange ? I have tried to use Developers to change the textbox ID, when I click on the button on the button, but it still recognizes the original textbox ID, so this error is not Puts it. I want to use this problem in front of the functional examiner's perspective, without changing the code only, please render it Thank you for your help & Lt; Td colspan = "5" style = "border-left: .5px; border-left-style: solid; border-right: 2px; border-right-style: solid; border color: & lt; telerik: radTextBox id =" OrderName "runat =" server "width =" 50px "skin =" simple "font-bold =" true "font-name =" wordana "font-size =" 11px "ForeColor =" # 22222 "backallo...

php - Unable to set my own Auth validation names for error message attributes in Laravel 4 -

मान लें कि मेरे पास यह है: {{form :: label ( ('ईमेल', 'ईमेल:')}} {{फ़ॉर्म :: टेक्स्ट ('ईमेल', रिक्त, ['class' = & gt; 'फॉर्म-कंट्रोल'])}} {{errors_for ('email', $ errors )}} लेकिन इसके बजाय तेह त्रुटि संदेश की तरह: आपका ईमेल मान्य नहीं है , मुझे ईमेल के लिए कस्टम नाम चाहिए ईमेल पता, इसलिए अंत में यह हो जाएगा आपका ईमेल पता मान्य नहीं है त्रुटि संदेश में विशेषताओं के लिए कस्टम नाम सेट कैसे करें I कस्टम संदेश बनाना चाहते हैं, सिर्फ एक कस्टम विशेषता सेट करने के लिए विशेषता से मेरा मतलब है शब्द : विशेषता में त्रुटि संदेश उदा .: "alpha" = & gt; "ए: विशेषता में केवल पत्र हो सकते हैं।" ऐसा कैसे करें कि अगर मैं इस तरह प्रमाणीकरण के लिए Laravel में Auth घटक का उपयोग कर रहा हूं: सार्वजनिक फ़ंक्शन बनाएं () {if (अनुरोध :: isMethod ('post')) {$ input = input :: only ('email', 'password'); $ इस- & gt; loginForm- & gt; मान्य ($ इनपुट); यदि (एथ :: प्रयास ($ इनपुट)) ...

How to show multiple images one after another in imageview dynamically in android -

Sir I am creating an app in which I have an activity where I will enter a sentence in the editing text box and my code Divide it into characters and then I should be shown in the same pattern according to the same picture as the same picture as each letter, from which sentences are made of characters. Now I do not know what technology I should use. One of my seniors asked me to use multi threading but I do not know how to code ... can you give me some hints? Please. About the final project of my MCS and we have not studied Android in our course work, I am doing it on my own. Really need some help. If you want to display your characters after each other i.e. after the next letter disappears The next letter will appear on the screen, for this, you will need basic multithreading. When you repeat the letters of your sentence on a separate thread, you need to make changes to the UI thread Assume that you have your string variable str string str = "YourSentence"...

php - Why would I bother using accessor functions? -

इस सवाल का पहले से ही एक उत्तर है: यह एक्सेसर फ़ंक्शन है: & lt;? Php वर्ग वर्गनाम {सार्वजनिक $ विशेषता; फ़ंक्शन __get ($ नाम) {वापसी $ this- & gt; $ name; }} $ A = नया वर्गनाम; $ A- & gt; विशेषता = "अन्ना"; $ Name = $ a- & gt; विशेषता; $ नाम गूंज; ?> ?> और यह एक्सेसर फ़ंक्शंस के बिना सिर्फ एक नियमित वर्ग है: & lt;? Php वर्ग वर्गनाम {सार्वजनिक $ विशेषता; } $ A = नया वर्गनाम; $ A- & gt; विशेषता = "अन्ना"; $ Name = $ a- & gt; विशेषता; $ नाम गूंज; ? & Gt; दोनों ही एक ही परिणाम प्रदान करते हैं मैं इसे प्राप्त नहीं कर पाया, किस मामले में मुझे एक्सेसर फ़ंक्शन का उपयोग करना चाहिए? 1) यह केवल आप नियंत्रण कैसे कर सकते हैं कि संपत्ति और किसके पास पहुंच हो सकती है। (एक्सेसर्स का इस्तेमाल करते समय यह संपत्ति निजी होनी चाहिए।) 2) आप कौन-कौन और कैसे इसे पहुंचा है, उसके आधार पर मूल्य में परिवर्तन हो सकता है 3) जब कोई संपत्ति होती है, तब आप किसी को सूचित कर सकते हैं उपयोग किया गया कोई और भी बहुत कुछ ...

python - Sign in with Twitter: how to verify the current user is stil logged in -

I sign into a Google App Engine Web App with the managed use of Oath authentication and Twitter app if The user is still logged in to Twitter, so how should I verify during site navigation? What are you talking about Twitter.com or being logged into your app is? If you have received access token Auth by app authentication, then log out twitter.com remain valid Tocents then you will not get any 'log out of the app, as long as that will not revoke user access.

linux - Python subprocess passes one argument only -

I have a Python script (2.7) which I use to apply an external process. Recently it worked fine. But now when I run it, I feel that it does not exceed the logic of the process. I have also debug the implementation process and it only receives the path of a logic (process executable). p = subprocess.Popen ([". / Myapp", "-p", "s"], shell = true) p.communicate () The code passes only "myapp" as a command argument. Why can this happen? when open = true , just a string (no list) pass Do; p = subprocess.Popen ('./ myapp -ps', shell = true) p. As always shell = wrong update ( Default) to shell = true and pass an array of stars; And A complete path to the executable, not a relative path. Ie; Subprocess. If you are interested only in the form of [[Proc: stdout, stderr = proc.communicate () popen (code)> standout (And not stderr ), like the above solution (it is safe and small): stdout = subpro...

SSAS Translation of the multiple parent hierarchy -

In the past, I am building an accounting multi-parental hierarchy for my project. The source view is attached here Our UDM has four dimensions: the only one which is more noticeable is based on Dim_CostCategoryHierarchies . First of all, we create a designated view called vDim_CostCategoryHierarchies , which we will use as the source for the dimension. Choose separately. [Pekcast Center Hierarchy], H. [FCONScenter], H. [FK_CostCenterHierarchyParent], h.Hierarchy, COALESCE (h. [CostcategoryOverrideeng], b.accountNo) No Account, Coalus (H [CostcontradarDDU], B.AntNameDue) At Encamedd, Coalus (H [CostedDataOverReadeng], B.AccountNameEng) asNameNameEng FROM [dbo] [Dim_CostCategoryHierarchies] AS H. Exclude d on the b as dbo.DimCostCategory. [FK_cast seater] = BPK_COST This is necessary because we have to define the names of all the nodes and leaves for all the hierarchies, a screenshot in the table Dim_CostCategoryHierarchies Hey there. I have not created an account in a tr...

Is there a way to get Selenium record to work consistently? -

The following is the first time I tried to record opening the Google home page, but later this exact one The action itself was not recorded, even if the record button was definitely activated. I have tried to restart the browser and selenium IDE, is there any trick to doing this every time? The version of Firefox is 31.0. Selenium IDE version is 2.5.0.

android - Starting two intents one after another -

I am trying to start two calendar entries that are clicked after a button, but this is not work Has been doing. Code: Intent calIntent1 = new intent (int. Action_INSERT); CalIntent1.setType ("vnd.android.cursor.item / event"); CalIntent1.putExtra (Events.TITLE, "TITLE"); Gregorian calendar calDate1 = New Gregorian calendar (year, month, day, hour, minute); CalIntent1.putExtra (Calendar contact. EXTRA_EVENT_ALL_DAY, incorrect); CalIntent1.putExtra (Calendar contact. EXTRA_EVENT_BEGIN_TIME, calDate1.getTimeInMillis ()); CalIntent1.putExtra (Calendar Contract. EXTRA_EVENT_END_TIME, calDate1.getTimeInMillis () + 2 * 60 * 60 * 1000); Intent calientent 2 = new intent (Intent.ACTION_INSERT); CalIntent2.setType ("vnd.android.cursor.item / event"); CalIntent2.putExtra (Events.TITLE, "TITLE2"); Gregorian calendar calDate2 = New Gregorian calendar (year, month, day, hour, minute); CalIntent2.putExtra (calendar contract. EXTRA_EVENT_ALL_DAY, incorre...

selenium - Validating The Login Credentials using Data Driven Frame Work -

Hello, I'm trying to validate credentials for many users using Selenium WebDriver as an example of Gmail Take it. All user and password information is saved in the Excel file. Issue: Ask for user 1 - I am entering a valid username and valid password then the Gmail home page is displayed (able to login and logout) - The exam is near. For user 2-I have entered the wrong identity in the excel file, but in the case of this error I am getting the error. Unable to detect element. Because the user was not logged in and the code is pointing to the element that will only appear after the user's login. For now, I tried to check the element with the "erro_msg" class, which if IF user enters the wrong identification, IF is visible. I tried to check whether the element is invisible, continue logging and if it shows "Invalid Credential Message", check it "Now the code is valid credentials Works fine for and logs out and this execution message for ...

c++ - Detect a blank string value -

I'm reading from an ascii file, which contains the information from the file, the file appears 1,434,341,158,498 , ... until the end of one line of pixels does not end, the next pixel line starts below 5,316,211,323,269, ... until all the pixels are covered, repeating them. I am trying to use getline () to write these data values ​​in an array for processing. The part of my code responsible for the value is as follows: while (! Asciiimage.eof ()) {string pixelvalue; Getline (Eskim, Pixelview, ','); Cout & lt; & Lt; Pixelvalue & lt; & Lt; Endl; } Finish this by the end of the file. It works fine for a single line of pixels, though at the end of the line of pixels the cout looks like this: 115 134 465 200 With the difference between values ​​I will find out the difference I have tried to use it pixelvalue.length (); Pixelvalue.size (); But both of them failed. How can I find out more about this empty value of PixelValue? if if...

jquery - add a class to the body of another page by clicking on a link? -

Is it possible to use jquery so that when you click on a link, it will go to the second page and the new page Body tag Surely the new page should open in the same window (not in the new window). You can do this in two ways, but in both cases you have to open a new page that you First solution is the first solution The first solution is for example an anchor like an anchor, and in the new page in search of anchor, if it is present then you add the class $ {Document} .ready (function () {var hash = Window.location.hash.substring (1); if (hash == "hint") $ ("body" ) AddClass ("class_to_add");}); If two pages are in the same domain, then you can use cookies as a hint. You can use a library for example to add a cookie and get a cookie in another page. // $ .setCookie ("hint", "value") in the first page; // $ in the second page (document) .ready (function () {if cookie ("sign") == "value") $ ("bod...

android - set selection of a Spinner (that uses SpinnerAdapter) programaticaly.? -

I am using spinner editor for my spinner, but I do not know how to set the selection in the code. Those who are not aware are not using the spinner adapters, so there was not much solution for my solution Here is my adapter: Private Class PackPricesAdapter BaseAdapter Expands SpinnerAdapter {@Override public int getCount () {refiner spinnerPackices.size (); } @OverWide Public Object Getitam (return status) {Return Spinner Practices.Jet (status); } @ Override Public Long ITMID (Status of Intake) {Return Status; } @ Override public view getView (int position, view view, viewgroup parent) {TextView text = new text view (mContext); Text.setText (spinnerPackPrices.get (status)); Text.setTextSize (13F); Return text; }} I want to know how I can set a selection program After setting up the adapter on your spinner , just call: spinner.setSelection (position); Where position is a 0-based position of the spinner item that you want to choose.

python - why I cannot run bzr explorer -

I have a python in Python Has been seen more ➜ ~ brew install qt Warning: qt-4.8.6 is already installed ➜ ~ brew install pyqt Warning: pyqt-4.10.4 pre-installed But then I try to run on my OSX: ➜ ~bzr explorer and This error is obtained: Invalid syntax (& lt; string & gt; line 1) U 'buzzer explorer' in '/ user / mine / .bazaar / Plugins are unable to load as plugins because the file path is not a valid module name; Try to rename it to 'U Explorer' Bzr: Error: A module called PyQt4 may require you to install this Python library separately. It looks like your market explorer plugin / user / me / Bazar / plugins / BzR-Explorer . Give that directory the name of the / user / ima / market / plugin / explorer and then it should work (as the error message was trying to tell you.) BTW , I recommend using the dmg file from the official website. The market explorer is included in it and should work out of the box.

html - CSS: background image only shows on first occurring div on page -

I have a problem that stumped me. I have simplified it on the relevant (only) CSS style: # section 1, # section 2 {width: 16.6667%; Height: 100%; Swim left; Background-image: url (../xyz-test / 1alt.gif); Repeat Background: No Repetition; Background-attachment: fixed; Background-position: top left; } and the related test is HTML: & lt; Div id = "segment1" & gt; Segment A & lt; / Div & gt; & Lt; Div id = "segment2" & gt; Segment two & lt; / Div & gt; So you think you take two identical divis sides along with the same background image - by the time it was provided, the background image was only for the first time. is. The problem appears on the rendering, not the code. If I first put HTML for Segment 2, then there is a background image and not another. Other CSS seems fine, just the background image fails. The background image path is fine. It looks like a problem within CSS with defining many background images, but I ...

android - How can I get Facebook userName by userID using Asp.net? -

Image
I am making an app for Android I now use the "Facebook SDK for Android" I can use the User ID and Store in SQL Server The problem is .. I use "asp.net 4.0" (Visual Web Developer 2010) and " Facebook "SDK" .NET "to parse the user name on the server without the login button? I got some information to use the dynamic access token. But whatever examples I have found, using the View 2013, MVC, login button is not what I want. I just want an original ASPX Does anyone know anything about the question? Facebook does not provide usernames If you are looking for a user's name then use this code Get accessstones here. Step 1: Step 2: Add Facebook reference to your project's new package. Use this name's location: using Facebook; Use this code: _apiKey = "API key" _apiSecret = "SECRET KEY" var accesstooken = " Accesstoken pass "stored ID hidden area" // check...

ios - Mail Compose not dismiss when click cancel button -

I have this code that sends the e-mail to the user, using MFMmail: .h file #import & lt; UIKit / UIKit.h & gt; #import & lt; Message UI / Message UI H & GT; #important & lt; Message ii / mfmail combo viewcontroller.h & gt; @ Interface Test Visual Controller: UIViewController & lt; MFMailComposeViewControllerDelegate, MFMessageComposeViewControllerDelegate & gt; @protecti (nanatomic, assign) id & lt; MFMailComposeViewControllerDelegate & gt; MailComposeDelegate; .m file @Synthesis Mail Write permission - Send (Zero) Email: (NSString *) Heroity // // Veer received email NSString * corpoMensagem = @ "There is no body yet ..."; // If within your Active View Controller ([MFMailComposeViewController canSendMail]) {MFMailComposeViewController * mailCont = [[MFMailComposeViewController alloc] init]; MailCont.mailComposeDelegate = self; // MailCont set subject to start mailComposeController when sending: @ "FazerBem - Rec...

c# - Understanding the result of the decimal constructor with 5 arguments -

Can you tell me how this output is? I do not understand this reasoning behind the curtain ..: P Here is my code: using the system; Public class main program {public static zero main (string [] args) {decimal d = new decimals (1234, 12121, 5454, false, 5); Console.WriteLine (d); }} Output: 1006085422300711931.09714 Press any key to continue. . . It is using decimal which allows you to specify different parts of decimal value. From the linked document: Low - Less 32 bit of 96-bit integer. Middle - Between 96-bit integer 32 bits Hello - High 32 bit of 96-bit integer. isNegative - correct to indicate a negative number; scale - a power from 10 to 0 to 28. Taking a few simple examples, you can see how the different values ​​affect the creation of a decimal value: console. WrightLine (new decimals (0, 0, 0, wrong, 0)); // 0 console.light line (new decimals (1, 0, 0, wrong, 0)); // 1 console.light line (new decimal (0, 1, 0, wrong, 0)); // 4294967296...

Diffrent result for CRC32 in c++ and java -

I am trying to calculate the CRC 32 checksum in C ++ but I'm still getting bad results C ++ code: class CRC32 {public: CRC 32 () {unsigned int poly = 0xedb88320; Unsigned int temp = 0; For (unsigned int i = 0; i gt; 1) ^ poly ; } And {temp> gt; = 1; }} Table [i] = temporary; }} Unsigned int computeChecksum (byte * bytes, size_t size) {unsigned int CRC = 0xffffffff; For (int i = 0; i & lt; size; ++ i) {byte index = (byte) (((CRC) and 0xff) ^ bytes [ii]); CRC = (unsigned integer) ((CRC & gt; 8) ^ Table [index]); } Return ~ CRC; } Private: unsigned int tables [256]; }; This Java code works fine: private int stmCrc32 (byte bite 0 []) {CRC32 crc32 = new CRC32 (); Crc32.update (abyte0); Return (int) (- 1l ^ crack 32.getValue ()); } This example is a hex string of data (the result should be 190 9 660290): 00: 00: 00: 00: 00: 00: 00: 00: 00: 00: 00: 00: 00: 00: 00: 00: 00: 01: 00: 12: 00: 59: 57: 52: 74: 61: 57: 34: 36: 59: 57: 52: 74: 61: 57: 34: 3d: 0d: 0...

Javascript canvas memory issue in Firefox -

I am trying to resize an image in several steps to increase the quality of the final image. This Opera works fine in the browser, but I think Firefox has a memory problem. After resizing some images, the following error has been made: Error: Image is corrupted or small: Blob: [XY]. So my question: Do you see a memory problem in the following code? loadImage.halfSize = function (i) {var c = document.createElement ("canvas"); C. With it Wide / 2; C. Hight = I Height / 2; Var ctx = c.getContext ("2D"); Ctx.drawImage (i, 0, 0, c.width, c.height); Return c; }; LoadImage.renderImageToCanvas = Function (Canvas, IMG, Sourcex, Source, SourceWidth, SourceHight, Destix, DSTI, DISTVUTH, DEST HEAT) {Canvas.Wind = SourceView; Canvas.height = sourceHeight; Canvas.getContext ('2d'). DrawImage (IMG, Source X, Source, SourceWith, SourceHight); If (SourceViews & lt; = destWidth & Source Hight & lt; = destHeight) {Return Canvas; } While (canvas.wind> dwind...

angularjs - Add content to transcluded content in angular directive -

I am trying to add content to embedded HTML inside my instruction. While this works visually, the console is giving me an error and I do not know how to fix it. There is a planker showing this problem: The line of app.js 39 is primarily what I am trying to do and is causing the error: children Prepended ('& lt; td & gt; & lt; input type = "checkbox" /> gt; & lt; / td & gt;'); In console output, this is: TypeError: Object 'nodeValue' can not be defined on ObjectInterpolateFnWatchAction [as fn] (https: / /code.angularjs.org/1.2.20/angular.js: 6913: 37) On Scope. Scope on $ digest (https://code.angularjs.org/1.2.20/angular.js:12447:29) $ Applied (https://code.angularjs.org/1.2.20/angular.js:12712:24) done (https://code.angularjs.org/1.2.20/angular.js:8315: 45) FullRoot At (https://code.angularjs.org/1.2.20/angular.js:8527:7) at XMLHttpRequest.xhr.onreadystatechange (https://code.angularjs.org/1.2.20/angular JS: 8466: 11) ...

java - Check if string taken with Scanner.next() contains number -

I wanted to take a string using the scanner .next () and see if there is a number in it or not. I used regex to check whether there is a number in the string but there is a number. The rajx works correctly if the string is coded hard, but not with the keyboard. I hope 5 will be detected as numbers, but it is not. Please tell me why. My code: import java.util.Scanner; Public class error {public static zero main (string [] args) {scanner inp = new scanner (System.in); Int num = 0; String input = ""; Boolean isStringNumber = true; System.out.println ("\ nPlease enter only one number ..."); Input = inp.nextLine (); IsStringNumber = input.contains ("[^ 0- 9] +"); If (isStringNumber == incorrect) {System.out.println ("\ nYou have entered a non-number" + input); }}}} A string as its argument > Uses. Instead, use mail isStringNumber = input.matches ("[0-9] +"); Or simply isStringNumber = input.matches ("\\ d +...

android - AndEngine and AndroidStudio -

I downloaded AndEngine, it has imported Android Studio and added it as a dependency on my Android studio project is. However, when it comes to compilation, however, the linkers fail to find GLES2, in particular, I get these errors: WARNING: (9, 63) WARNING: Different sizes Insert the indicator from the integer of [-wing-to-pointer-cast] Warning: (13, 36) Warning: Error inserting indicator from different integer integer: (9) Undefined reference error for `glVertexAttribPointer ': (13) Undefined reference for `glDrawElements' I have libgles2-mesa pack H (Ubuntu 12.04) designed to be installed and symbolic /usr/lib/libGLESv2.so.2 library. However, the lancer does not find the library.

How to customize a full screen background image slideshow with Vegas jquery plugin -

I need help customizing a jQuery plugin I do not have much experience with javascript or jQuery. I am a very newbie I downloaded the Vegas 1.3.4 plugin because I have to do a full screen background slideshow on a school project that I'm working on. But I do not know how to customize this plugin. I think 'jquery.vegas.js' is where all the magic happens I read through the documentation for slideshows here: and found this piece of code: $ Vegas ('Slideshow', {Background: [src: '/img/background1.jpg'}, {src: '/ img / background2.jpg'}, {src: '/ img / background3.jpg'}]} ) ('Overlay'); Where will I keep this piece of code? Whether & lt; Head & gt; Here? & Lt; / Head & gt; seems to go in or does it 'jquery.vegas.js' that I will specify your background picture? It would be very helpful if someone can help me solve this little puzzle :) Viewing Source, Code to & lt; Head & gt; & Lt ;...

python - Speicherzugriffsfehler (Speicherabzug geschrieben) - memory-access-error (core dumped) -

Recently I was searching for a graphic library to use with Python. While panda3d and pyglet tests I could not run examples as well. I do not know at all that this is due to the same problem, but I think it is a common issue, unfortunately I do not have enough experience to solve this problem and hence some help is needed. I found the following errors: Paget: Run this code Import, window window window = window Strong> panda3d: Starting game is known pipe type: glxGraphicsPipe (Load all display modules.): Performance: x11display (error): BadRequest (Invalid Request Code or no such operation) ... ca. 140 times ...: Display: x11display (error): BadRequest (invalid request code or no such operation): display: glxdisplay (error): usable pixel format could not be found: display: glxdisplay (error): no GLX reference No: Can not open window: Display: x11display (error): BadRequest (invalid request code or no such action) ... ca. 20 times more ...: Performance: x11display (...

javascript - Synchronizing Asynchronously made Asynchronous calls -

I'm stumped Actually, I have an HTTP REST API for which I will use asynchronous I can request to provide and provide callback I also have a web front end which will call this API in arbitrary time on arbitrary times. The problem is that the API requires 'nons', a number that is more than the last with each request, it is easy to prepare this number in such a way. Ensuring that the request reaches the correct order .. It is not so. I want a way that I can call only functions and provide callback from my API module. And the modules will handle this before any pre-made calls will be finished before making a new call. Definitely there is a module that allows one to run with asynchronous function synchronous but I need to know all the functions I had to set a fire before in the normal API call Are doing this // This can be likened to a new request with my existing system, while its first process is in the middle. Api module var agneensifen = function () {var d =...

Google Analytics Enhanced Ecommerce - Track Product View with 'event' rather than 'pageview' -

Is this acceptable? Calling pageview in the header, and then sending an event (pages) at the bottom of the page? // head ga ('create', 'UA-XXXXX-Y'); GA ('Requirement', 'ECC'); Ga ('Send', 'Pageview'); // Product Description / body ga ('EC: adproduct', '' id ':' p ​​12345 ',' name ':' Android vorhall t-shirt ',' category ':' apparel ',' brand ':' Google ',' Version ':' black '}); GA ('EC: set action', 'expansion'); Ga ('send', 'event') Will this be a better practice? // head ga ('create', 'UA-XXXXX -Y'); GA ('Requirement', 'ECC'); // Product Description / body ga ('EC: adproduct', '' id ':' p ​​12345 ',' name ':' Android vorhall t-shirt ',' category ':' apparel ',' brand ':' Google ',' Version ...

winapi - Starting Windows program using win32api under Win7 -

I am trying to launch an existing Windows 7 program using win32api under Python3.5. The program starts and offers a dialog (required) Clicking on the right result is the result of "failing to make the process" as it has been said beforehand that I manually delete the file manually by double-clicking on the icon on the desktop I start with the dialog and click OK to do everything OK I consider it a Windows permission issue, but it is not clear why the reason Or, does anyone any suggestions. The code for launching the application is shown below: Import importcash import time import win32api pathFileEPT = r "c: \ user \ bartis \ 1234 sss xyz r7.0.2 \ xzay.exe "#Osstart.file or program using win32api #Os.startfile (pathFileEPT) win32api.WinExec (pathFileEPT) time.sleep (2) # click on the ACK OK button in the same behavior. Notes # Programmatically call or manually click # and send the exact same error message. Tablecloth (951,581)

Command-line PHP truncating date("c") -

शेल-स्क्रिप्ट के लिए यहां मेरा PHP कोड है: #! / Usr / bin / Php -q & lt;? Php $ user = get_current_user (); $ पंक्ति = दिनांक ("सी")। "-" $ उपयोगकर्ता + "\ r \ n"; गूंज "--------------------- \ n"; गूंज "उपयोगकर्ता = & gt; $ उपयोगकर्ता \ n"; गूंज "--------------------- \ n"; प्रतिध्वनि "तिथि ('सी') = & gt;" तिथि ("सी") "\ N"; गूंज "--------------------- \ n"; प्रतिध्वनि "तिथि ('वाईएमडी') = & gt;" तिथि ("वाईएमडी") "\ N"; गूंज "--------------------- \ n"; गूंज "रेखा = & gt; $ पंक्ति \ n"; गूंज "--------------------- \ n"; गूंज दिनांक ("सी") "-" $ उपयोगकर्ता + "\ n"; गूंज "--------------------- \ n"; गूंज दिनांक ("सी") $ उपयोगकर्ता + "\ n"; गूंज "--------------------- \ n"; गूंज दिनांक ("सी") "-" ...

ios - Swipe Left to go Back -

With OnsenUI 1.10, there is a way to swipe left to go to the previous page? OnsenUI, the app can see very native, however, swipe-left IOS 7 gesture is important for my user experience. I noticed: where the user can swipe left to go to the previous page (on desktop environment, you can drag from left to right) Any ideas? A solution is to use the hammer included in the onson UI. You can trace the gesture and can act, for example, ons.bootstrap (); Hammer (window, {stop_default: true}) .on ("swiperight", function (event) {if (myNavigator.getPages (). Length & gt; 1) {myNavigator.popPage ();}}); Where myNavigator is defined & lt; On-navigator title = "navigator" var = "myNavigator" page = "page 1.html" & gt; & Lt; / On-navigator & gt; Note that in the above example, we do not use the AngularJS controller and access the Navigator directly. This is a new feature of Ocean UI 1.1.0.

android - How to update activity's layout after resume from other activity ? -

I have implemented a timetable and I want to know how to update the time table activity (of this activity Layout) To be more specific after adding an event to a different activity, the layout of the timetable has the "Add Event" button and then the new activity is opened and then I want to come back to the layout of the timetable and the new event Show me Where do I say code which updates the timetable layout? Thank you ... You override the onResume method of your timetable activity can do . @ Override Public Wide On Resume () {// Your Update Code Here} [is the honorable method] When Called Your activity activity at the top of the stack, in which the user is getting the input, will start the conversation with the user.

Leaflet.js How to stop on map evnet -

I call a function when the user is panned with the map: $ ('#updateTheMap') Click (function () (if (document.getElementById ('updateMap').) Was checked {// stop dragent event ...} and {map.on ('dragend', Function () {SortBinis (simpleFilterSql);});}}); But I did not know how this event would end? Use a variable: var updateTheMap = true; $ ('# UpdateTheMap'). (Function () {updateTheMap = document.getEle MentById ('updateMap'). Checked;}); Map.on ('dragend', function) {if (updateTheMap) sortBinis (simpleFilterSql);});

sql - How to create Trigger to prevent inserting the duplicate row in MYSQL 5.0.27? -

यह प्रश्न निम्न पिछले प्रश्न का पालन करता है। मेरे पास एक तालिका MyText है जिसमें आईडी कॉलम, text कॉलम & amp; कई अन्य कॉलम आईडी - पाठ - प्रकार .. और अन्य फाइल 1 - यह मेरा पाठ है 2 - xxxx मुझे text कॉलम समर्थन यूनिकोड चाहिए अधिकतम लंबाई के साथ 700 यूनिकोड वर्ण रख सकते हैं। मैं अद्वितीय (टेक्स्ट) को सेट नहीं कर सकता क्योंकि यूनिकोड को 3 बाइट्स लेते हैं, इसलिए मुझे 2100 बाइट्स (700 * 3) अद्वितीय कॉलम की आवश्यकता है। तो, समाधान एक ट्रिगर को क्रेट करना है जो उपयोगकर्ता को डुप्लिकेट सम्मिलित करने से रोकता है। उदाहरण के लिए, यदि उपयोगकर्ता " यह मेरा पाठ है " (हम केस संवेदी पर ध्यान नहीं रखेंगे) में MyText तालिका में प्रवेश करेंगे, तो Mysql पूरी तरह से सभी प्रश्नों को रद्द कर देगा जिसमें डालने स्टेटमेंट और सिस्टम को अन्य क्वेरी करने से रोकने के लिए SQLException उत्पन्न करेगा। ठीक है, मान लीजिए आपको अपने जावा कोड में एसक्यूएल स्टेटमेंट की एक श्रृंखला चलाने की है MyText में डालें ('यह मेरा पाठ है', 1); अन्य टेबल में डालें ('कुछ पाठ');...

job scheduling - Oracle Scheduler stop job gives an exception when the job is not running -

When I'm not working, I'm getting an exception when trying to stop a scheduled job in Oracle . This is probably normal but in my case I need to stop and disable the job before running some DDL operations. If I check the status of the job first then there is no guarantee that it starts immediately after the investigation I do not know it is clear. Any ideas about how to proceed? Thanks - stop and disable jobs about the job Unblock exceptions, do not exist, or are unknown because it is possible - the job is still over. This means that there will be no exception here, even if the job name is wrong V_not_running declares an exception; V_does_not_exist exceptions; V_unknown_job exception; Progress exception_init (v_not_running, -27366); Program exception exception_it (v_does_not_exist, -27476); Pragma exception_init (v_unknown_job, -27475); Start getting started dbms_scheduler.stop_job ('TEST_JOB'); Exception when v_not_running or v_does_not_exist or v_unkn...

Php script doesn't capture input fields -

Can someone hope me why my PHP script does not capture on my input field? The snippet and the relevant php bits of my code are below. The other aspect of this code that I use in other forms works well. Note that the current naming protocol is used for the total number in my JavaScript that works very well. Maybe some PP script does not like my naming protocol ?? HTML code; & lt; TD ALIGN = CENTER> & Lt; INPUT TYPE = Hidden Name = Product_1_view value = "10.00" & gt; 10.00 & lt; / TD & gt; & Lt; TD align = center> & Lt; Selection Name = Product_1_qty onChange = FormatFields () & gt; & Lt; Option value = 0> 0 to & lt; Option value = 1> 1 & lt; Option value = 2> 2 & lt; Option value = 3> 3 & lt; Option value = 4> 4 & lt; Option value = 5> 5 & lt; / SELECT & gt; & Lt; / TD> & Lt; TD ALIGN = CENTER> & Lt; INPUT TYPE = text NAME = Product_1_subtitlen VALUE = "0....

c++ - OpenCV: Error for failure to load library libopencv_calib3d.2.4.dylib -

Image
I am trying to set up OpenCV (installed with homebrew) on my Mac and run the command. G ++ $ (PKG-Config - CFLAG - LBS OpenCV) test.cpp -o Test & amp; However, I found this error: [1] 7834 characters: library not loaded: lib / libopencv_calib3d.2.4.dylib Referenced: /usr/local/Cellar/opencv/2.4.9/include/./test Reason: Image Not Found Trace / BPT Trap: 5 I'm not sure what to do Very novice CC and C ++ to open the care of this problem. The following file structure shows the Test.cpp file is second to the right with the picture. I do not know that the program has not got the file, as the name and location are correct. test.cpp: #include "opencv2 / highgui / highgui.hpp" # include & lt; Iostream & gt; Using namespace cv; using namespace std; Int main (matrix argc, const char ** argv) {cout & lt; & Lt; "Test Output Line" & lt; & Lt; Endl; Mat IMG = Remat ("M.P.J.G.", CV_load_IMINUINUINUINT); // Read the im...

arrays - Signal created with matlab function block in simulink -

I want to generate an arbitrary linear signal from the matlab function block in simulink. I want to use this block because then, when I generate a signal from a sequence in Stateflow, I want to control it. I try to extract a function from a function with a value and any other time as the following code: `function y = sig (u) if u == 1 t = ([0 10 20 30 40 50 60]); T = [(20 20 40 40 60 60 0]); Sitem = [t ']; S.signals (1) value = [t].; S.signals (1) = 1 dimension.; Other N = ([0 0 0 0 0 0 0]); S.signals (1) value = [n '].; End y = s.signals (1). Value end The idea is that U == 1 generates the signal, U == 0 generates zero output function y = sig (U) [0, 0]); Cant = input ('number of digits'); For n = drange (1: slang) s (n, 1) = input ('time'); S (n, 2) = input ('temperature'); Finally y = [s] and y = [0] end of end I can not generate the signal in either case In the first case, I get such errors : There is no field 'sign...

ios - How to change UIView's position in code? -

I created a custom viewcase class connected to a xib layout file, and I added some labels to xib. But when I want to change the label's position in the code, it does not work, so why can you tell me? Here are the relative codes: Public override zero layouts subviews () {base.LayoutSubviews (); Var border = content view. Bounce; UILAB label_primoz = Retrolview ("label_preiaad"); Label_period.ContentMode = UIViewContentMode.Redraw; Label_period.Text = string.Format ("{0} 天 之 旅", m_travel_data.period); \\ Works Label_preod.fr = New Rectangle (20, label_preview.frame.ew, label_pre_frame.fr; method, label_preview.frame.heat); } This is strange, because the text has actually changed, but not the frame. There are some things you can try here. Try calling first label_period.SetNeedsLayout (); Or possibly (but unlikely) label_period.SetNeedsDisplay (); If none of those things are there, then I will be checking to see that you do not have any ...

javascript - How to decrease the page load time when multiple css are used -

When I use multiple CSS and JavaScript files, I can reduce page load times. In my website's home page I have used about 6 JavaScript and 3 CSS files, I know that these files can help page load time. The files I used are: js & lt; Script src = "js / jquery.slides.min.js" & gt; & Lt; / Script & gt; & lt; Script / script & gt; & lt; Script src = "js / prefixfree.min.js" & gt; & Lt; / Script & gt; & lt; Script src = "js / response.js" & gt; & Lt; / Script & gt; & lt; Script src = "js / lightbox.js" & gt; & Lt; / Script & gt; CSS & lt; Link href = 'css / style.css' rel = 'stylesheet' type = 'text / css' media = "screen" & gt; & lt; Link href = 'css / reset.css' rel = 'stylesheet' type = 'text / css' media = "screen" & gt; & lt; Link href = 'css / li...