Posts

Showing posts from January, 2010

html - CSS image pathing when sourced from a different host using IE -

Image
[Setup: on ASP.NET MVC3 Azure for CSS files and assets for Azure Blob storage on HTTPS ] I am currently building a website that selects a suitable CSS style sheet based on the selection of the host - this website is allowed to enable for different brands Which changes by all the CSS, but its control references the host tents Uses an MVC controller that detects the host, then redirects the css file and related assets (i.e. images) from a different location (using an asp.net rewrite rule). For example: www.host1.com will reference a CSS file with requests from myCssAndAssets.mycoreserver.com/css/ www.host1. Com www.host2.com will reference a CSS file with requests from myCssAndAssets.mycoreserver.com/css/ www.host2.com This works completely different from a small problem, breaking things when using Internet Explorer. In short, Internet Explorer successfully receives the CSS file, but it can not reference any image referenced in that file. Here, all the images are ...

javascript - Ajax not working for dynamic key in data parameter -

I am trying to create an Ajax function like this: var vm = $ No dispute (); Vm (document) .ready (function () {var loadMore = function (e) {var idd = vm (this) .attr ("id"); alert (e.data.recordId); // this return blog_comment_id if i Provide stable value for data key aaa = e.data.recordId; vm.ajax ({type: "POST", url: "ajaxHTML.php", data: ({e.data.recordId: idd}), Cache: False, Success: Function (Race) {Warning (Leak); VM ("#" + e.data.divId) .html (res);}}}}} And calling this Ajax function in this way, I'm actually trying to make it dynamic where I will provide div id and record id. vm (function () View_more "). {DivId:" fgh ", r Record id: "blog_comment_id"}, load more);}); This is not working if I am the data equivalent Ameter like this: Data: ({e.data.recordId: idd}), Data: ({blog_comment_id: idd}), So how do I get it with dynamic keys I can make The aid will be appreciated

Accessing Document inside Object using plain Javascript -

I have a sample HTML structure, where two DOMs are available at the same HTML below. I use javascript in HTML to & lt; Object & gt; Embedded inside the tag, & lt; H1 & gt; Trying to access the tag I tried to use the following javascript and could not get the text value of H1. Please note, I just do not want to use javascript via javascript. & lt ;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Meta charset = "UTF-8" & gt; & Lt; Title & gt; Test JS & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div class = "parent" & gt; & Lt; H1 class = "header_Child" & gt; I'm within the original HTML & lt; / H1> & Lt; Div class = "objectWrapper" & gt; & Lt; Object type = "text / html" & gt; #document & lt ;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; T...

Siemens DICOM Individual Slice Time (Private_1019_1029) -

I see the personal piece information from the field of the Private_0019_1029 DICOM header is negative value and some Time only positive value I think these times are in relation to the time of volume acquisition recorded in the header. Going from that assumption, this would mean that the time of acquisition changes. But on checking the differences between the time of continuous acquisition of the quantity, I see that it is equal to TR. Therefore, I am getting damaged about what is happening. I am trying to see the raw FMRI data, piece time correction; Therefore it is necessary at the time of different slices. Does the Moko range change time apart, changes the mistake? (I do not believe this experiment was used, but your experience might otherwise show up). Indicates how the time of their piece is measured Try computation with the raw and moco series and see that the bar line up. You can get your answer from this.

php - Convert numeric string into string -

itemprop = "text"> Actually I have the following string: > And I have to change it to the following thing: one * two * five * four * USD * four * zero * cent How can I do that? So far I have written something like this: public function value broken string ($ value) {$ output = ""; $ Characters = str_split ($ value); Foreign currency ($ character $$) {if (is_numeric ($ char)) {$ output. = (String) $ char is "*"; }} Returns $ output; } But that does not work because it only displays the integer ... how can I solve it?

php - Using DOMDOCUMENT to pull JavaScript values -

Is it possible to use the DOM document to drag javascript values? & lt; Script type = "text / javascript" & gt; Var datePickerDate = "14 October 2014"; $ (Document) .ready (function () {// Meetings datepicker $ ("# datepicker") Datepicker ({showOn: 'button', button image: '/images/calendar.gif', button image only: true , Select: function (date text, insta) {populate_meetings (dateText, 0)}, date format: 'mmm yy', minedet: new date (200 9, 0, 1), maximum date: 0}); $ '(' # Datepicker ').' Options', 'Default Date', New Date ("14 October 2014"); $ ('# Date Picker') Val ("14th October, 2014");}); // Call on page load to get meetings and date populated_times ("14th October, 2014", 15515); & Lt; / Script & gt; This is output in HTML, so I know this ... and I want to read the date so that var datePickerDate = drag, so it returns on October 14, 2014 ...

php - Have Image Files Printed on Screen Inside While Loop (Corresponding to the Thread ID)? -

यह प्रश्न अपडेट हुआ है: मेरे पास इन कॉलम में संग्रहीत हैं तालिका "थ्रेड": आईडी - शीर्षक - कैप्शन - image_file_id - hashtag_id - date_created "image_file_id" के लिए एक उदाहरण, यह आईडी संख्या है छवि फ़ाइलों के लिए "चित्र" तालिका का: 583, 584, 585 स्क्रिप्ट को "शीर्षक" और "थ्रेड" तालिका से "कैप्शन" और उन्हें एक लूप के साथ प्रिंट करें, तब इसे भी प्राप्त करना चाहिए छवि फ़ाइलें और " पूर्व> थ्रेड आईडी: 35 & lt; h1 & gt; शीर्षक & lt; / h1 & gt; & Lt; p & gt; कैप्शन & lt; / p & gt; 1. & lt; img src = "" / & gt; 2. & lt; img src = "" / & gt; 3. & lt; img src = "" / & gt; 4. & lt; img src = "" / & gt; थ्रेड आईडी: 36 & lt; h1 & gt; शीर्षक & lt; / h1 & gt; & Lt; p & gt; कैप्शन & lt; / p & gt; 1. & lt; img src = "" / & gt; 2. & lt; img src ...

sql server - set trustworthy on - is it a bad practice? if so any alternatives? -

I have a group of users "readers" who are the only debaters on "Myadabs". I have a stored procedure. 1: 2 - Update data within "mydatabase", 2 - Reduce the tables within the database "mydatabase" - and this is done by dynamics Using SQL because we do not know the names of tables which have to be shortened 3 - Update in the tables in "mydatabse2" Cord 4 - Enter the record inside tables in "Mydatabse3" The way I have solved this problem is: 1 - I changed the DB owner of all these 3 databases 2 - I changed the stored procedure "sep" to execute as oven 3 - I have all these 3 databases I am setting it as trustworthy. All is well. My concern is, and therefore the question is here: Is there any serious security difference which is open using on trustworth? I could not find anything serious, so I'm leaving it. As long as no one can remind me of something, I can not remember. This TRUST...

If hashcode of two String literal and string object is same in java then if they compared by == .Then find false.Why? -

इस सवाल का पहले से ही एक उत्तर है: 11 उत्तर नीचे दिए गए कोड में हैश कोड का s1 और एस 3 बराबर हैं लेकिन एस 1 == एस 3 गलत क्यों देता है? कृपया इसे स्पष्ट करें। यहां एस 1, एस 2 और एस 3 में एक ही सामग्री और हैशकोड हैं। कोड नीचे चलाते समय 108274800 108274800 108274800 s1 == s2 s1 .equals (s2) s1.equals (s3) संहिता निम्नानुसार दी गई है ... सार्वजनिक वर्ग StringTest { / ** * परम अरग्स * / सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग [] आर्ग्स) {// टूडो ऑटो-जनरेटेड विधि स्टब स्ट्रिंग s1 = "राहुल"; स्ट्रिंग s2 = "राहुल"; स्ट्रिंग s3 = नया स्ट्रिंग ("राहुल"); Println (s1.hashCode ()); Println (s2.hashCode ()); Println (s3.hashCode ()); यदि (s1 == s2) {System.out.println ("s1 == s2"); } यदि (s1 == s3) {System.out.println ("s1 == s3"); } यदि (s1.equals (s2)) {System.out.println ("s1.equals (s2)"); } यदि (s1.equals (s3)) {System.out.println ("s1.equals (s3)"); }} } == केवल संदर्भ प्रकार की तुलना कर...

facebook graph api - scribe oauth connection refused -

I am trying to write just a copy of the Facebook example, which asked to paste the code, The request was received after entering. below and paste it here authorization code as AQB7XIMSqkD_OjE_bbHAz4nWQxkuWrQLUmCsYcw5VW4Tlxti3PEA-8F7YGNLKhonX0tBzA2GaXpt7Mz7ym83j4aeXc6kCHurqSRVbB8DpXSjnnkh3cm3XwUHJEfuOeo3Zf_gEFOtlJDvET-b38ECz4Y4jke5gCSmu9NIndG376M4r4siNXGopHq8VO4fQSw9tg_1O27GR3CNSbKVrx1Mk-GqPIhVHg28Zt5zikthZ7l9t8zI_nXIo6T3F17FJxQGMT8NZL8kGh4fUmGAMKCHouP964b_67F6ddQ3K6u1C4KNdSfNiLY76Qude8OWtweeK1Tou29hvs1iJojuMaWEs8Va In I am getting this error. Request tokens for an entry token business ... exception in the thread "main" org.scribe.exceptions.OAuthConnectionException: There was a problem when creating a connection to the remote service org.scribe .model.Request.send (Request.java:70) org.scribe.model.Request.send (Request.java:76) com on org.scribe.oauth.OAuth20ServiceImpl.getAccessToken (on OAuth20ServiceImpl.java:36). because of ibm.fb.FacebookExample.main ...

c# - How can I access ViewModel from Javascript -

Is there a way to access a view through javascript? I have a situation where I have many partial (representing different methods of inputing data). Some javascript on each of these inputs The radio button list, buttons and even text boxes are straight. But I can not get a list of dropdowns to work for. @ html.DropDownList ("Answer", New Selection List (@ Model, "ID", "Answer Text"), "[Please Select]") & lt; Script type = "text / javascript" & gt; $ ('# Answer') Change (function () {var text = ($ ('# option option: selected'). Text ()); var id = ($ ('# answer option: selected'). Val ()); // var nextId = @Models.Find (x = & gt; x.Id == ID). Next ID; Answer selected (text, id, next id);}) & lt; / Script & gt; Then the problem is on the line of comments. I need the answer to the selected code 3 parameters is there any way to pass my Voododal to Javascript, as I can see that I can d...

linux - Get the load, cpu usage and time of executing a bash script -

I have a bash script that I run every 5 or 15 minutes to use the crontab when it is loaded on the server I am planning to I can find time to run the script, but use loads, memory usage and CPU usage I'm not sure how to search. Can anyone help me? > Any suggestions from some benchmark that will help me to decide that the script holds too much weight and should run every 15 minutes and 5 minutes. Thanks in advance! itemprop = "text"> You can use "top-b", top CPU usage, memory usage etc. on top Put these scripts in your script, this process will end in the background and in the form of your test overs as soon as possible. ssh server_name "nohup top -b-0.5> HTC & gt; file_name & amp; \ The above process will run in the background because & amp ;, 0.5D will give you CPU position in every 0.5 seconds, and for later analysis the output will be redirected to file_name. To kill the process after your test, enter it in you...

ember.js - How to Populate Ember.Select with Model Data? -

I have read many other questions about amber. Select, but nothing to do enough work. I have dropdowns for filtering some fields in my returned data. Actual filtering is another issue, I am just trying to get a drop down population in the moment. My work with the steady orange declared on my controller, as I want, but what should I need from the dropdown data to populate with unique values, so I do not have to maintain an option. I think all I need is a way to set a field in the content property of the selection, but only content = field Or contentBinding = field has not worked. Any suggestion or best practice on this will be highly appreciated. Here is a working code snippet: app = Em .Application.create ({displayName: 'Some.App'}); App.Person = DS.Model.extend ({name: DS.attr ('string')}); // This is testing the data that should come from your backend API APP App.Person.FIXTURES = [{id: 1, name: 'John Oliver'}, {ID: 2, name: 'John ...

Issue: PouchDB Video in Android Chrome, Firefox and Opera -

I have an app where I would like to "download" the video so that the user is using an app that uses PouchDB Able to In other words, I am trying to store the video using PouchDB and display them when I am offline. I have an issue in Android Chrome, Firefox and Opera, where video indexed DB is submitted by PouchDB but they are not displayed. The error itself appears with a blank video component or a message in Firefox "Video can not be played because the file is corrupt". I tried to use indexed DDB chrome and Android chrome but everything looks correct. I have also added logging in callback methods to find errors, but no error has been thrown . Has any other kind of errors occurred like this? Thanks

d3.js - How to scale 2 axes on a certain date with dimple/d3? -

I have a chart that receives 2 sets of data and draws a chart of 2 axes; The scene has provided a simple example. The relevant piece of code: var x = myChart.addTimeAxis ('x', 'date', '% d -% m-% Y', '% D-% m-% Y '); X.showGridlines = true; X.addOrderRule ('Date'); var y1 = myChart.addMeasureAxis ('Y', 'total cost'); Y1.showGridlines = true; Var y2 = myChart.addMeasureAxis ('Y', 'total value'); Y2.tickFormat = '1f'; Y2.showGridlines = true; Var s1 = myChart.addSeries ('figure type', dimple.plot.line, [x, y1]); S1.data = first_series; Var s2 = myChart.addSeries ('statistical type', dimple.plot.line, [x, y2]); S2.data = second_series; What I want to do is scale the two axes on a definite scale (such as 01-10-2014), the point is at the same level at the height of the chart. Thank you, Alexandra I have given an example on how it should look (the date drawn by me is approxi...

php - website setting in a database table -

Image
मैं एक सीएमएस बना रहा हूँ, सीएमएस जानकारी एक mysql डेटाबेस एक तालिका को cms_settings मुझे setting_value प्राप्त करना चाहते हैं और इसे किसी चर में संग्रहीत करना है, उदाहरण के लिए: $ cms_url =?? $ Cms_theme =? मैंने mysqli_fetch_array () का उपयोग करने की कोशिश की है लेकिन मैं इसे सही नहीं कर सका। & lt ;? Php की आवश्यकता होती है ('db.php'); $ S = mysqli_query ($ conn, "SELECT * FROM cms_settings"); $ I = mysqli_fetch_array ($ s); विदेशी मुद्रा ($ i के रूप में $ कुंजी = & gt; $ मान) {$ cms_url = $ i [0] [2]; }? & Gt; लेकिन वह काम नहीं कर रहा! आपकी मदद की अत्यधिक सराहना की जाती है, आपको अपने परिणामों के माध्यम से पाश की आवश्यकता है शायद ऐसा कुछ करने की कोशिश करें: & lt;? Php की आवश्यकता है ('db.php'); $ Settings = array (); $ S = mysqli_query ($ conn, "SELECT * FROM cms_settings"); जबकि ($ पंक्ति = mysqli_fetch_assoc ($ s)) {$ settings [$ row ['setting_name']] = $ row ['setting_value...

javascript - How to add Dropdown arrow to a <li> which has child elements -

यह मेरा मूल मेनू है & lt; ul class =" mymenu "& gt; & Lt; li & gt; & lt; a href = "#" & gt; 1 HTML & lt; / a & gt; & lt; / li & gt; & Lt; li & gt; & lt; a href = "#" & gt; 2 सीएसएस & lt; / a & gt; & LT; ul & gt; & Lt; li & gt; & lt; a href = "#" & gt; 3.1 jQuery & lt; / a & gt; & LT; ul & gt; & Lt; li & gt; & lt; a href = "#" & gt; 3.1.1 डाउनलोड & lt; / a & gt; & lt; / li & gt; & Lt; li & gt; & lt; a href = "#" & gt; 3.1.2 ट्यूटोरियल & lt; / a & gt; & lt; / li & gt; & Lt; / ul & gt; & Lt; / li & gt; & Lt; / ul & gt; & Lt; / li & gt; & Lt; li & gt; & lt; a href = "#" & gt; 3 जावास्क्रिप्ट & lt; / a & gt; & lt; / li & gt; & lt; ul class = " mymenu "& gt; ...

c# - What type is inside a generic container -

सार्वजनिक टी getValueByName & lt; T & gt; (स्ट्रिंग नाम) {यदि (टी सूची है) ऑब्जेक्ट में निहित प्रकार = टी.WhatGoesHere ()? ... उपरोक्त कोड में, मुझे यह जानना होगा कि क्या मैं एक सूची को किसी भी प्रकार की सूची में परिवर्तित कर सकता हूँ, जैसे, सूची & lt; नियंत्रण & gt; । क्या निहित प्रकार के लिए सामान्य पूछताछ करने का कोई तरीका है? मैं सूची & lt; नियंत्रण & gt; , सूची & lt; स्ट्रिंग & gt; , सूची & lt; फ़ॉर्म & gt; आदि प्राप्त कर सकता था। एपीआई को अलग-अलग तरीके से सूची में वापस करने के लिए विभाजित करता है जहां निहित प्रकार में पारित किया जाता है, इस प्रकार कॉलर को सूचियों के लिए एक विधि का उपयोग करने की आवश्यकता होती है और एक सरल प्रकार के लिए। किसी भी तरह से उन्हें पता चलना है कि क्या वापस आ रहा है, लेकिन अगर मैं जो पूछ रहा हूं, ऐसा करने का एक आसान तरीका है, तो मैं एपीआई को सरल रखता हूं। ध्यान दें: यह कमी का समाधान है सह-प्रलोभन के कारण, क्योंकि निहित प्रकार पर परिभाषित एक अंतर्निहित रूपांतरण ऑपरेटर भी है, तो सूची टू टी में विफल ...

Add (multiple) values to a data frame with R shiny -

I am using R glow in combination with ggplot to see a certain dataset. I want the user to be able to add value to this dataset I can do my application to show the original figure + a data point, but as soon as a user enters a new point, the old one goes: User input data is not actually stored in my dataframe. / P> Some code I am using (name changed for simplicity): shinyServer (function (input, output) {output $ newPlot Users can pay a value with textInput for x and y, and then deposit those values ​​with a button ( action button ). U The yogi hits the 'add', the recently input values ​​for X and Y are displayed at the top of the original data, but any other value inputted by a user (in the same session) is lost. How can I remember users and plot all my things? I especially Can not reproduce you provided by you Code given, but an example might help you. The portion you want is ReactiveValues ​​ , you can store your datasets and update it throughout the se...

ole - How to open Outlook message from an external applicatin -

I want to send Outlook to Outlook from a external app to open a special message in the original viewer. I have an entry ID of the message, does anyone have to do this? I have searched around and I can not find any guidance. Some of the following (VB scripts) must work: Set App = CreateObject ("Outlook.Applicatiobn") Set NS = App.GetNamespace ("MAPI") Set NS.Logon Message = NS.GetItemFromID (YourEntryId) Message Display (True)

c# - Change float type precision -

I want to decrease the float type precision from 7 to 6. "I tried to multiply the number 10 but it did not work. Any ideas? If you are just trying to format the number on the output (i.e. a string in the conversion), you just need to use a proper format string: 13.651234f.ToString ( "F6"); // always be the six decimal places If you have to do this for your application logic, you might want to decimal float is used> - float is a binary number, so the notion of "decimal" decimal space is a little far away.

rest - Using Node.js & NForce, Retrieve Records on Startup -

I am trying to modify this code: As well as setting up the streaming, it also performs a query on the startup to retrieve some records that appear to the user. I am trying to apply code like this: var q = 'Select ID, name, date created, billing from account'; Sfdc.query ({query: q}, function (mistake, resp) {if (! Disturbances and resp.records) {// do something with records, display the client}}); After connection and setting out, however, I do not know where the code should be placed in the life cycle of the main application (app.js). Also, I am unsure of how to pass this record to me so that it can be displayed on the client side. App I get this error when I put this code in different places in JS: TypeError: The undefined property 'instance_url' can not be read

entity framework - Lead to order relationship code first -

Hello I'm trying to install the first code in the unit framework 6 and wondering how I would do the following I am / P> I have a lead class and a order class. The order class should have lead , but leads can be made without any orders and no one is associated with it The user can leave before making an order. So my class structures are as follows: Public Leads {Public Ent ID (Receive); Set; } ... other non-related properties} public order {public diagnosis id (get; set;} public int LeadID {get; set}} public virtual lead lead {get; set;} ... other non-related properties } and I tried to link them using OrderConfiguration () . HASRQUIRED (O = & Gt; o.lad) but it is looking like something like WithOptional or without ... HasForeignKey Instead of What is a way to link to these, so that leads auto order leads class order Without the need, code> You have to set the attribute for the forgin key that must be seen [key] public i...

java - Cp command android from assets folder -

I want to know if it is possible that the "F" / bin partition (explicitly with root access) / P> utility.exac ("cp & lt; file: /// and android / asset / my_file" / system / bin "); Is this code valid for copying system / bin from properties too? Here's a clear example, suppose the root gets: asset manager assetManager = context.getAssets (); InputStream = Faucet; OutputStream OS = Faucet; Try {is = assetManager.open ("my_file"); OS = New FileOutputStream ("/ system / bin / my_file"); Byte [] buffer = new byte [1024]; Integer length; // When copying the contents of the file into byte ((length = is read.buffer) gt; 0) {os.write (buffer, 0, length); }} Hold (exception e) {// dealing with the exception, log or something} end {if (is! = Null) try {is.close (); } Hold (IOException E) {} If (os! = Tap) try {os.close (); } Hold (IOException e) {}}

automation - Create password protected Windows user with salt -

To run a window service with this user account, I need to create a password protected Windows user account, Try snippet: tcagent3-user: user: - present - name: tcagent3 - password: tcagent3 - groups: # German administrator group is used - admin - system: true Unfortunately the user created is not protected by the password Do not see the docs , Passwords are not seen at all by the windows. I saw the other snippet using the passwd , but that does not work anybody have any ideas for getting it by salt I can imagine that if present outside the salt box If I do not have a command line call, can I use it as an alternative solution? Cheers,

Play Framework Java Authentication for Assets -

I have a play application that creates files in a public folder in a user session, these files are like working files . Now, with many users working at the same time, I want to restrict any user to my work file and not anyone else. How I What did I think about it? Submit the files to the root of the application and send files to Javascript Text "itemprop =" text "> You can use some authentication structure (such as) You can then manage files from the controller. Once you are in safe action or UserAwareAction , you can get user recognition and some of the defining identities You can access the correct file based on the property

avfoundation - How do I convert a CMTime to an NSValue in Swift? -

I was trying to speed up the use of Aviplayer's method and CMTimes NSValues ​​ , which take the form of the addBoundaryTimeObserverForTimes input. In the end, I worked in wrapping the [nsetring valued adcmtim:] in the C function and called it fast, but is there a way to do it at a faster speed? valueWithCMTime: is the SWIFT constructor for NSValue (CMTime) :) : Import CoreMedia import AVFoundation cmTime = CMTimeMake (10, 20) cmValue = NSValue (CMTime: cmTime)

python - Why does padding an FFT in NumPy make it run much slower? -

I wrote a script using NumPy's fft function, where I used to input my input array Padding was fast to get the FFT, the closest power of 2 After the outline of the code, I came to know that FFT was taking the longest time, so I fielded around with the parameters Done and found that if I not the pad input array, FFT went on fast several times. This is a minimal example to illustrate what I'm talking about (I went to the IPython and used the % timeit magic at the time of execution .) x = np.arange (-4. * Np.pi, 4. * np.pi, 1000) dat1 = np.sin (x) Time result: % timeit np.fft.fft (dat1) 100000 loops, best 3: 12.3 μs per loop% timeit np.fft.fft (dat1, n = 1024) 10000 loops, the best 3: 61.5 μs per loop Padding the array in the power of 2 is going to a very tough slump. It comes Even if I create an array with a prime number element (hence theoretically slow FFT) x2 = np.arange (-4. Np.pi, 4. * np.pi, 1009) dat2 = np.sin (x2) Even the time it takes to m...

php - zend 2 - custom field name in validation message -

I would like to customize the input name to show in my view when there is an error in the verification of the form $ this-> Add ('Array' ('name' = & gt; 'generic_diskrio', // I have to give her name '' // 'custom_name' = & gt; 'Descrição', 'required' = & gt;; right, = & Gt; array (array ('name' = & gt; 'notEmpty', 'options' => array (' message '= & gt; array (' isEmpty '= & gt;' s campo node And when I call getMessage () as above form $ ($ $ form-> isValid ()) {$ resultado = new result ( Results: FLAG_WARNING, $ form-> getMessages ()); $ resultado-> SetterOronoFro ($-- getServiceLocator ()); Return Result $ ->; GetJson ();} They will come back array ('Descrição' = 'O cam po non pod ser vazio'); Then I can give this array in my view and communicate with the correct message Can I show, how can this help in ...

Form validation in javascript - minimum characters -

I need to validate a form and I want every input to be more than 6 characters. The following script is working for 0 characters How do I edit it to set the minimum letters to 6? & lt; Script & gt; Validate function form (form id) {var input, index; Var form = document.getElementById (formId); Input = form.gate elements biatagnam ('input'); ({Index [index] .value == ft; input [index] .value = (if index [index] is to deal with {index] [index] element for index (index = 0; index & lt; inputs.length; ++ index) = "") {Warning ("field is empty"); return false; }}} Here's the form: & lt; Form name = "myForm" id = "myForm" method = "post" action = "onsubmit =" validate return form ('miform'); " Style = "margin-bottom: 10px;" _lpchecked = "1" & gt; & Lt; Div id = "InputsWrapper" & gt; & Lt; Div & gt; & Lt; Input type = ...

regex - Searching through text for a pattern and replacing the entire pattern in VB.NET -

I am fully collecting information from the Internet to see how to pattern a pattern through a string of text and She has to change something else with it. I am just starting to learn about RegEx and how to use them, as I think it is best that fits in my needs for the application. Actually what should I do that a string is read from a text file, which can have definitions of 3 ZPL II labels, and change some commands / parameters, by passing all the data to a wireless label printer first. For example, I need to find the Media Dark Command, ^ MDxx, where xx is an integer that will set the darkness for the printed label. Xx can be negative, positive, and up to but always does not have 2 digits (range-30 to 30) Therefore, a special MD command can be from 4 to 7 characters, and each label can vary for definition, at which I am processing once. I need to replace these three orders with ^ MD-13. This is a code based on my research, and it is curious to know if I am doing something wr...

angularjs - Purposefully not returning child values when retrieving a Firebase object -

I have a user object in Firebase db, in which some sensitive date (e.g., email). For situations where I need to get user information (which are not current users), how do I stop this data from returning? (For example, if the user can see other user's profile data.) Options Using Firebase : The option with this problem is that there are tons of errors throwing while trying to recover the user object (even if I want to hide sensitive child values ​​under that user object). My data is so that public and private data are in two separate ways Option # 2 makes me viable It seems, but I want to see before making a major architectural overhaul that there is no easy solution? Regarding security rules, the Firebase action is not all-or-nothing. As a result, all attempt to load / users / will fail because your customer is not allowed to read all of the data in that location, though you some have the same type of data there, in the same way as writing a locat...

how to transfer files to android one using ubuntu 14.04 -

Text after " Copy and paste windows / mac us through the default Andriod transer file. I can not paste a paste / paste file in SpiceAndroid One Dream UNO Mi-498 I am using Ubuntu 14.04 and yes reffering for gmtp does not work and $ lsusb bus 002 Device 014: ID 18d1: 4ee1 Google Inc. Nexus 4 $ lsusb -v Bus 002 Device 014: ID 18d1: 4ee1 Google Inc. Nexus 4 // O, but my creator is spice device descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 ( Interface level defined) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x18d1 Google Inc. // I wonder Ase device ID is associated with LG Nexus 4? IdProduct 0x4ee1 Nexus 4 BCD Device 2.16 iManufacturer 2 Spice // This My Mobile Maker IP Product 3 Spice MI-498 ISL 4 MI 49989 1H 14090139 BNU Configuration 1 Configuration Descriptor: BLID 9 BDScriptter Type 2 WTL Lamp 39 BNI Interface 1B Configuration Value1 Icon Configuration 0 BMAtivets 0xc Self-powered MaxPower 500 MA Interface Descriptor: bLength 9bD...

c# - The path is not valid. Check the directory for the database. [Path = (Localdb)\v11.0] -

I am working on an MVC web application using SQL Server and entity framework (first timer). I get lots of forms that add stuff to the data table and this type of use (localBD) \ v11.0 and I know that there is data my next step on which I am currently I'm adding the login / register function I'm adding try {WebSecurity.InitializeDatabaseConnection ("DefaultConnection", "UserProfile", "UserId", "UserName", AutoCreateTables : True); } Hold (exception e) {Console.Write (e); } In my Global.asax.cs file in the application_Start method is my default connection And, of course, is set in my web.config. Now when I step through the code, it throws an exception that there is no database (Localdb) \ v11.0 Maybe some of the buses I see I'm not as good as your good friend Google can get through. Your connection string for LocalDb should look something like this (assuming that the MDF file inside your solution The app_da...

javascript - Send MediaStream object with Web Audio effects over PeerConnection -

I am trying to send the audio, received from getUserMedia () and the web Audio WebRTC has the ability to do this in API Web Audio API and WebRTC on peer connections but I am having trouble understanding how it can be done. Within the Web Audio API, there is a method in audiocontax object createMediaStreamSource () , which provides a way to connect to the mediastream received by getUserMedia (). Also, there is a createMediaStreamDestination () method, which returns an object with a stream attribute I get both audio and video from the getUserMedia () method. What's the problem I'm having, how do I pass this stream object (both with audio and video) (such as: CreateMediaStreamSource ())? Do I need to remove it first, by any means, find a way to combine it back with audio (getAudioTracks) and video from the stream? Or do I pass this and leave this video unaffected? Can the audio be changed only once (before being added to a peercode)? createMediaStreamSource () ...

sql - how to select characters after first 20 characters from field mysql -

address 1, address as address (first 20 characters) from customer as address 2 How do I select a string after 20 characters? To get the letters after the first 20 characters (note that if there are no twenty letters, the function will return an empty string): SELECT SUBSTRING ('some random address that is 20 characters Is too long '20); Now if you have to know 2 to be taped, then first check the character: if you select (char_length (address)> 20, SUBSTRING (address, 20 to 20); To get 20 characters from the first letter, you can use such substring functions: SELECT SUBSTRING ('some random address' 1, 20); Now the last query may look like this: SELECT SUBSTRING (address, 1, 20) address 1, IF ( 20 as address 2, SUBSTRING (20 addresses, NULL) from CHAR_LENGTH (Address) & gt;

office 2010 - Excel multi column lookup -

I am unsure of how this is Google. I have a table that looks like the bottom last name | First name Team A | Team B | Team C Smith | John | X | | Do | | Jane | | X | This will be the main sheet, the names of this sheet are divided into other sheets, depending on which department they are involved in. Those sheets are setup in the same format with the same column. If people in the main sheet are marked in one of the columns, then I should mark that same column marked with department sheets. Your best bet might be to create a hidden column A where the value is all your tabs But there is a combination of column B and column C. You can then use standard VLOOKUP wrapped in the IFERROR section. For example, = IFERROR (VLOOKUP (A1, Sheet1! A: F, 3, False), "") IFERROR handles this example that there may be a name on your sub-tab on the main tab, it gives empty space in place of #N / ​​A, what value is being examined in A1 on your main tab in VLOOKUP A1 is. A1...

javascript - Using jQuery to rearrange page elements -

I'm relatively new to jQuery and JavaScript, and I think I understand what my problem is, but I Not sure how to fix it. I have the simple time to get the current time and season for 4 cities. Js, moment I am using JS, and moment.JS timezone. I have all the data on the page, but I want to transfer the time of every city as the second paragraph in every city's development. Any ideas about how to work with my existing code or a more efficient way of producing this result? This is my JS: $ (document) .ready (function () {$ ('. Season'). Function () (Var City = $ (this) .attr ("city"); Viral despair = $ (this) .attr ("woeid"); var degree = $ (this) .attr ("degrees"); var Continent = $ (this) .attr ("continent"); $ .simpleWeather ({postcode: '', such: Hi, location: '', unit: degree, success: function (weather) {if (continent == ' America ') {Html =' & lt; p & gt; '+ weather.city +...

ios - Center 4 images with constraints autolayout -

Image
I'm new to autolayout and I like how to focus these 4 images in all different devices like this Looks at the images I have tried to apply auto-configured obstacles, but then it will be at that distance and which is not fit on all devices. So my question is whether to focus all the images with the same distance I'm going to have obstacles on all the different images Need to apply? Here's how my cell looks in the story: image of the barrier option on Image 1: In the image simulator: /// MY TRY //// Can you see the barriers I have added and the results? Result: Your approach is almost perfect, there is no shortage of images in it. If you are t dynamic, the size of the images and the constant space between them Put the barriers on the image for the width to keep >, = 20 (or any other value, depending on your needs ) And keep an obstacle aspect ratio for it, then Ctrl-drag from UIImageView1 to UIImageView2 and set an interrupt for eq...

visual studio - Reference C++/CLI class in xaml static resources -

I am currently developing an app for Windows 8.1, I would like to insert a stable C ++ class Fixed Reef Class BooleanTuViewicon Conorrir Seal: IValueConverter In the resource list located in another xaml file: & lt; application. Resources & gt; & Lt; Local: BooleanToVisible Converter x: key = "BULLCONNV" /> & Lt; /Application.Resources> As hard as I try, I keep getting the following error: The name "booleanTuVibleConverter" is not used in the name "app 15" namespace. For information, "Local:" is used as "App: 15", which is the namespace of the C ++ file. I have made every namespace possible, there is no way I can manage myself to get this job done ... There may be other problems (such as namespace announcements in your XML file), but I get two things about the definition of my class: / P> You need to declare your class public public F class ... High does not do anything here. M...

ruby - Jammit and Grouped Package Includes -

There is an asset.yml file for my Papera app which is using jammat. Here's an example I want to accomplish, but can not. Application: & amp; Application - App / Property / JS / Seller / jquery-2.1.1.js - App / Assets / JS / Seller / Underscore.js - App / Assets / JS / Underscore.String.JS_Association_Apps: - & lt; & Lt;: * Apps - Apps / Assets / JS / Underscore.string.js - App / Assets / JS / Seller / Engeleries / Angel.JS - App /assets/js/vendor/angularjs/angular-sanitize.js - App / Assets / JS / Seller / Angular_Plagin / ** / * JS This is an error I get An unbalanced conversion of the hash in the string Other in my layout Package is easy to include, but it means more and more requests and I do not necessarily mean an essential property order (for example Coin is required in this package before). A solid half day of Googling has not happened! thank you! I think its indentation problem only, nothing else you own .yml content http://yaml-onli...

c# - MsBuild from command prompt is not generating the FakeAssemblies -

I have a test project in my solution that uses counterfeit for testing, and I have the same solution to other projects In. When I create a solution in VS 2013 everything works well and I see that the FakesAssemblies folder is made with fake for my dll. But if I do not see the msbuild command prompt from the FakesAssemblies folder and my test project fails with fail reference DLL. Login with MSBuild: (ResolveAssemblyReferences target) -> C: \ Windows \ Microsoft.NET \ Framework64 \ v4.0.30319 \ Microsoft.Common.targets (1605,5): WARNING MSB3245: This reference could not be resolved The assembly could not be detected "CustomNetworkLib Fax" Make sure that the assembly is present on the disk. If this reference is necessary for your code, you can get the compilation errors. .... FakeNetworkHelper.cs (1,28): Error CS0234: Type or Namespace name 'Fakes' does not exist in the namespace' CustomNetworkLib Binding '(Are you missing an assembly referen...

java - JInternalFrame Opening and Focus -

I have got a generic frames inside the desktop pane, and I have seen something with opening them for the first time. When I open one for the first time, and then open each other, then the first GenuineFrame will be on top of the other. I want them to open up to each other, but this is only for the first time now I realize that this is due to the order that they are adding. But my program will get the right information on the desktop pad load, so I have to add the JEF variable before windows are actually opened. So how can I ensure that the window that opens opens on the top, in spite of whatever is added in that order? I do not want to use a dialog box.

css3 - CSS Transform: scaleX not working in Safari -

I have this shark that floats on my site. It goes back and forth by using CSS conversion: scaleX property this one Goes on, goes on the other side, revolves, etc. It works in every browser except Safari. Any ideas? HTML: & lt; Div id = "shark" & gt; & Lt; Div id = "shark_body" & gt; & Lt; / Div & gt; & Lt; Div id = "shark_fin" & gt; & Lt; / Div & gt; & Lt; / Div & gt; CSS: # sharks {width: 500 px; Height: 220 pixels; Status: Completed; Top: 75%; Left: 20%; Padding: 0; Animation-name: Swimming; Animation-period: 50s; Animation- Count of Travel: Infinity; Animation-timing-function: linear; -moz- Animation-name: swim; -moz- Animation-duration: 50s; -moz-animation-count of travel: infinity; -MOZ-animation-time-work: linear; -webkit- Animation-name: swim; -webkit- Animation-duration: 50s; -webkit- Animation- Count of Travel: Infinity; Webkit-animation-timing function: linear; } And here's th...

javascript - Get A Script To Work Using hostname To Grab URL -

I'm trying to figure out how this script works and it's disappointing. Here's the original: & lt; Script Type = 'Text / Javascript: I'm trying to improve the script by holding the URL instead of entering the URL manually. '& Gt; MakeSlider ({url: "http://yourdomain.com/" // Add your blog URL}); & Lt; / Script & gt; Here's what I've tried (and others like this): & lt; Script type = 'text / javascript' & gt; Mascular ({url: "http /" + window.location.hostname + /}); & Lt; / Script & gt; I also tried to use a variable: & lt; Script type = 'text / javascript' & gt; Var getDomain = "http //" + window.location.hostname + /, Mass Slider ({url: getDomain}); & Lt; / Script & gt; None of my efforts work out. Try var getDomain = "http: //" + Window.location.hostname + "/";

haxe - How to move border-less window around? -

Image
I created simple and small application with a clock using HaxeFlixel and native build. The window can not be resized or even transmitted because I have made it limitless in project.xml . The only way to move this window is to set the position of the mousemove event and the corresponding window accordingly. The first seems simple, but later I see the problems in HQ API, OpenFL API and Hexelb but I can not see anything that can move the window around. Here's the clock: I created this project based on the function Lib.application.window.move (x, y) It is not very smooth. I am trying to improve it, but it is working.

osx - Yosemite upgrade broke ruby.h -

After upgrading to Yosemite, I get this error which contains anything that is ruby.h : /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Ruby in file Were included. Structure / Version / 2.0 / usr / include / ruby ​​2.0.0 / ruby.h: 33: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System / Library / Frameworks / Ruby.framework / Versions / 2.0 / usr / include / ruby-2.0.0 / ruby.h: 24: 10: Fatal Error: 'ruby / config.h' file "#included dark red Did not get /config.h "^ 1 Error generated [1]: *** [objects / if_ruby.o] making error 1 [1]: *** Waiting for incomplete jobs .... Make: *** [first] error 2 and sure enough, /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10 .9.sdk / System / Library / Frameworks / Ruby.framework / Versions / 2.0 / usr / included / ruby ​​2.0.0 / dark red / config.h...

javascript - DataTable jquery selectors not firing -

I have code to handle clicks on line or individual cells. $ (document) .REDE (function () {var JSON_URL = '{% url} technician_activity "%}'; var oTable = $ ('# technician_activity'). DataTable ({" True "server side": true, "Ajax" ": JSON_URL," jQueryUI ": true}); Warning (" Do not work without this alert selectors? OTable = "+ oTable); oTable $ ('Tr'). Click (function () {var data = oTable .fnGetData (this); Alert ("Column" + Data);}); oTable. $ ('Td') (function () {Var data = oTable.fnGetData (this); Alert ("cell" + data);});}); One thing that I like is without the first warning statement Warning ("Do not work without the warning selectors? OTable =" + OTable); The tr and td selectors do not work. It is very amazed for me - is this the difference that is doing this warning? Now I am using the suggested code here - But it is still a question that wh...

jinja2 - Introspection in Jinja template in SaltStack -

We want to add some boilerplate information, which is a file written in blood through salt; Basically note that the file is managed by salt, and the state it generates. I can not find state information. It does not appear in opts salt-call state sls foo which provides it provides , But the state.sls liability does not appear from a genome template. Am I missing it somewhere? Or is it not possible to say, by typing a ginja extension that digs in the salt sandbox? Have you checked what you want?

scala - How can I alias a covariant generic type parameter -

निम्न कोड संकलित नहीं होता है (स्काला 2.11 में): केस वर्ग कोवेरियंटक्लास [ + आर] (मूल्य: आर) {प्रकार टी = आर डीएफ़ मिलते हैं: आर = मान} वस्तु मुख्य {डीईफ़ मुख्य (एजीआर: एरे [स्ट्रिंग]): यूनिट = {प्रिंट्लएन (कोवेरियंटक्लास [स्ट्रिंग] ("हैलो")। )}} त्रुटि संदेश है: त्रुटि: (4, 8) संप्रभु प्रकार आर अपरिवर्तनीय स्थिति में टाइप प्रकार आर प्रकार टी प्रकार में होता है टी = आर ^ मैं एक सह प्रकार प्रकार पैरामीटर क्यों नहीं कह सकता? अगर मैं लाइन टाइप T = R को निकालता हूं, तो कोड को संकलित करता है और हैलो प्रिंट करता है, इसलिए उपनाम समस्या लगता है दुर्भाग्य से, इसका मतलब है कि मैं अधिक जटिल प्रकारों के लिए एक उपनाम नहीं बना सकता, उदाहरण के लिए, प्रकार टी = सूची [आर] या तो संकलित नहीं करता है, हालांकि सूची सह-संबंध है। से: एक प्रकार का दायां हाथ उपनाम हमेशा अपरिवर्तनीय स्थिति में होता है। इसका अर्थ है कि आप उपनाम T नहीं बना सकते और दाईं ओर एक प्रकार का प्रकार R निर्दिष्ट कर सकते हैं -हाथ की तरफ। वही सूची [आर] पर लागू होता है, क्योंकि यह भी संप्रदा...

groovy - Grails urlMappings action and controller behavior not using controller logic -

मेरे पास एक grails ऐप है जहां urlMappings.groovy फ़ाइल की सामग्री है: नियंत्रक = "घर" दृश्य = "घर"} मेरा घर नियंत्रक ऐसा दिखता है वर्ग होम नियंत्रक { सूची उत्पादों = [['कीमत': 100, 'desc': 'a'], ['मूल्य': 200, 'desc': 'b']] def घर () [[उत्पाद: उत्पादों]} जब मैं localhost: 8080 / myProject / home / home पर नेविगेट करता हूं, मेरे पास "$ {products}" तक पहुंच है, लेकिन जब मैं लोकलहोस्ट: 8080 / मायप्रोफ़िक्स पर जाएं, "$ {products}" स्टेटमेंट रिक्त है। यह क्यों है और मैं कैसे लोकलहोस्ट: 8080 / मायप्रोइज जैसा कि स्थानीयहोस्ट: 8080 / मायप्रोजेक्ट / होम / होम ? ">

javascript - jquery retrigger click after download -

I am trying to catch up with JQuery when a user listens or downloads my songs, and Gaul Analytics Generates an event for. & lt; Audio> Element This works fine, but there is some discomfort when the user downloads the song. The code is: $ ("audio"). Bind ("play", function (event) {ga ('send', 'event', 'audio', 'play', event.target.id);}); $ ("Audio"). Bind ("end", function (event) {ga ('send', 'event', 'audio', 'end', event.target.id);}); Click (function (event) {ga ('send', 'event', 'audio', 'download', event.target.id);}); All play and end events are cached, as long as the user does not click on the "download" link for the first time. The first download event has been triggered correctly, but no more events have been detected since now, neither play or end. I also tried: $ (document) .on ("click", "a: c...

directory - python raw input delete the zero in the begining? -

I use this code to create a directory with input from the user, but when entering the perfix like 00 or 011 , Then ask for the first inputs: except for numRan = int (raw_input ("how many perfix do you want to start? \" ")): Print" perfix should be a number "sys.exit () Any explanation? The function ignores any leading zeros in the string. But it seems that you can simply leave inpt as a string in your code: inpt = raw_input ("perfix % D: "% (i + 1)) If you want to allow only numbers, you can use it.

sqlite - Generating attendance list for hours without a matching row -

I have a project that calculates working hours from the presence log, which I import from the presence machine. I use the SQLite database and VB.NET. First I will show the table I use: create table [check los] (without [IDCheckLog] Basic primary key operations, [IDEmployee] text not null, [dates] text tap, [in] text, [out] text, [overtime] NUMERIC DEFAULT 0); Making table integer (INTEGER tap primary key); INSERT integer (i) value (0), (1), (2), (3), (4), (5), (6), (7), (8), (9); The table check lodge is the data that I import from the presence machine. Overtime columns are calculated in my program. The table integer is used to create the date list, I found it. I want to create a visual person that shows employee attendance between 2 dates and displays checkload data if the employee is present and is absent if absent. Because there is no data from that employee in the table check lodge, when the employee is absent. This is the view that I want (this employee is between ...

C++ Stack Using Templated Linked List - Memory Leaks -

I'm trying to figure out how to remove all memory leaks from this code. I know that this problem may be by using the push (t-value) function new node & lt; T & gt; (Value) , but I do not know how to fix it. / P> #ifndef MYSTACK_H #define MYSTACK_H #include & lt; Stdexcept & gt; using namespace std; Template & lt; Class T & gt; Class Mistakes {template & lt; Class G & gt; Square node {public: g; value; Node * next; Node (t wall, node * n = null): value (wal), next (n) {}; }; Public: MyStacks () {Head = Null; Tail = null; My_size = 0; }; ~ Mistakes () {Removing Head; } Zero Push (T-value) {If (head == faucet) {head = new node & lt; T & gt; (value); Tail = head; My_size ++; } And {node & lt; T & gt; * Temp = new node & lt; T & gt; (value); Temp- & gt; Next = head; Head = temporary; My_size ++; }} // . (Deleted - Summary) Private: Unsigned int my_size; The node's & lt; T & gt; * Head; The node's ...