Posts

Showing posts from August, 2014

java - Running msys.bat using ProcessBuilder -

I am trying to use msys.bat in ProcessBuilder in java. When I run a .bat file with my program, the following error occurred: "rxvt.exe or sh.exe binary - can not be canceled." Press any key to continue ... " Here is the code, processbilder MSIS = new processbilder ("C: / MMSIS / 1 / MMS.Bit", "/ c", "find" c: / user / dan g / Desktop / hello \ ""); Process p = Msys.start (); String line; BufferedReader r = new BufferedReader (new InputStreamReader (p.getInputStream ())); While ((line = r. radline ()) = null {}. System.out.println (line); } R. Close (); The goal is to compile some of my projects. The command is just a test for a result, not what I want to do. Thanks for the help! .bat files are their own and those called Windows Command Processors, cmd before your bat file Do not forget to load the Windows Command Processor also .exe processbilder MSIS = new process builder ("CMD.exe", "c: / mmsi...

mstest - How do I clear the [Ignore] cache for test methods? (without restarting Visual Studio) -

I have some tests that were marked as [ignored] , but now , I want to run again, so I remove the [Ignore] attribute, but Visual Studio still does not pay attention to them. Now what can I do to clear the cache to ignore the tests? Update: It seems that this data is stored in the vsmdi file: & lt; TestLink ..name = "legal name" ... enabled = "wrong" /> Then it is necessary to remove the windy file, or otherwise to revive it. However, Visual Studio caches it, so restarting the Visual Studio seems to fix the problem (sometimes at least). We have this issue where I also work. You can manually change the .vsmdi file or delete it. If you open the test scene again (after deleting it) it will generate a new file. In addition to this, there may be a similar problem with which you have selected the selected test settings, it will also be 'cache'.

python - Django:datefield showing constant time -

यह मेरा मॉडल है: वर्ग संदेश (models.Model): status_choices = ( (U'read ', u'read'), (u'unread ', u'unread')) उपयोगकर्ता = मॉडल। फ़ॉरइंजकी (यूज़र) संदेश = मॉडल। टेक्स्टफिल्ड () स्थिति = मॉडल.कारफिल्ड (max_length = 6, विकल्प = स्थिति_कोरिस, डिफ़ॉल्ट = 'अपठित') प्रेषक = मॉडल। फ़ॉरविन्की (उपयोगकर्ता, संबंधित_नाम = "प्रेषक") तिथि = मॉडल.डेटफेल्ड (डिफ़ॉल्ट = datetime.date.today, संपादन योग्य = गलत) तो अब हर संदेश में "तारीख" फ़ील्ड "12:00 पूर्वाह्न 11 जुलाई 2012" पर सेट है। ऐसा क्यों है? datetime.date.today () समय मूल्यों को वापस नहीं करता है, इसलिए यह आधी रात को चूक है अपनी अंतिम पंक्ति को तारीख = मॉडलों में बदलें। डेटाटैमफिल्ड (डिफ़ॉल्ट = datetime.datetime.now, संपादन योग्य = गलत) ।

javascript - JSON syntax error on Windows 2008 -

I'm trying to implement a JSON call to simulate AJAX on a certain page where an AJAX panel is a Not a viable option. When a state is selected from the drop down and the county falls into the drop down, I want to call my .aspx page. In my state dropdown, I have this call: onchange = "jsonDropDownLoader ('COUNTIES', this, 'Content2_DDLCounties')" This call Page and code is here: function jsonDropDownLoader (sType, oParent, oChild) {var lstrChild = document.getElementById (oChild); Var lstrFilter = "" if (operant.value> "") {lstrfilter = oParent.value} lstrChild.options.length = 0; If (operant.value> "") {var JSONobject = {}; Var http_request = new XMLHttpRequest (); Url = "/AltairWeb.NET/RS/jsonDropDownLoader.aspx?type=" + sType + "and FILTER =" + lstrfilter http_request.open ("GET", url, incorrect); Http_request.onreadystatechange = function () {var done = 4, ok = 200; If (http...

- Where Developers Learn, Share, & Build Careers

I'm one. I am writing NET windows form which is used to import and compute a lot of data. Each import has been made for this purpose, I have created a "main" worker and many "hair" workers. Import jobs are all listed within a MySQL database and I have set up a function that checks whether the job exists or not. I need to know that where the child labor is ending their jobs, then control is passed? Do children need to call the main worker again to run and assign child labor to them? The main worker is called on the form load event, so if I run my main worker for the first time and start work at the level of the child, will the main staff control the form load again? I would like to write my app every cost money (for API usage / hits) from my import jobs, so I want to write as much app as possible before running a test. Yes, once you start the background work, you control the return on the calling method, While the work gets processed on another t...

- Where Developers Learn, Share, & Build Careers

I have a style for an image button, as I am following, how can I create a text block, Where equals "POSITION" 'below, similar to button content? Thank you. ' style x: key = "top button style" target type = "button" & gt; & Lt; Setter property = "padding" value = "0" /> & Lt; Setter Property = "Button. BorderBrush" Value = "Steelblue" /> gt; & Lt; Setter property = "button. BorderThickness" value = "0" /> gt; & Lt; Setter Property = "ContentTemplate" & gt; Setter.value & gt; & Lt; DataTemplate & gt; Grid background = "steelblue" & gt; & Lt; Image source = "picture / blue_button_up.png" horizontal align = "center" margin = "0,0,0, 0" height = "auto" width = "auto" statch = "uniformtofil" gt; & Lt; Text block text = "position" horizontal ali...

sql server 2008 - How to create a matrix with SQL -

इस तरह भौगोलिक डेटा रिकॉर्ड के साथ: START | अंत CITY1 | स्टेट 1 | CITY2 | राज्य 2 ---------------------------------------------- न्यूयॉर्क। | NY | बोस्टन | एमए नेवार्क | एनजे | अल्बानी | NY क्लीवलैंड | ओह | कैंब्रिज | एमए मैं इस तरह से कुछ आउटपुट करना चाहूंगा जहां यह एक प्रारंभिक / ईएनडी युग्मन मैट्रिक्स के रूप में प्रदर्शित होता है: | एमए | एनजे | NY | ओएच ------------------------------ एमए | 0 | 0 | 1 | 0 एनजे | 0 | 0 | 1 | 0 एनवाई | 1 | 0 | 0 | 0 ओह | 1 | 0 | 0 | 0 मैं देख सकता हूँ कि कैसे ग्रुप बी और COUNT को डेटा मिल जाएगा लेकिन मैं मैट्रिक्स । क्या किसी के पास कोई विचार है? ऐसा लगता है कि यह चाल, PostgreSQL 9.1 पर परीक्षण किया गया था। यह लगभग निश्चित रूप से SQL सर्वर के लिए अनुकूलित करने की आवश्यकता होगी (किसी को भी उस प्रभाव का जवाब देने के लिए स्वतंत्र महसूस हो रहा है)। SELECT प्रारंभ राज्य के रूप में, SUM ((dest = 'MA') :: एनएन, एसएम (डीआईडी ​​= 'एनजे') :: एनएन, एसएम ((डेस्ट = 'एनजे') :: आईएनटी) के रूप में ओह (सेलेक्ट राज्य 1...

- Where Developers Learn, Share, & Build Careers

I have a script that is at $ (window). Resize () needs to hide the divs in a list. However, because I am using the old OS, my browser does not change in realtime again, instead it detects a trail where this size will change, and then open to go, this size changes. Type, the script below only removes a device from the list instead of all those conflicts. How can I fix this? jQuery: $ (window). Resize (function () {movePivots ();}); Function Slobient () {var last_pivot = $ ("ul li: last"); If ($ ("# container"). Width () - $ ("ul"). Width () & lt; = 0} {last_pivot.remove (); } Else {}} CSS: # container {float: left; Width: 50%; Minimum width: 450px; Max-width: 900 pixels; Height: 1000px; Background-color: #EE; } #nav {float: left; Background color: #ddd; Minimum width: 450px; Max-width: 900 pixels; Width: 100%; } Ul {float: left; Margin: 0; Padding: 0; List style: none; Background color: #ccc; } Use a while loop: $ (Window). Resiz...

- Where Developers Learn, Share, & Build Careers

Can an IP address be connected to a specific port on a 3 port Cisco switch on a computer? I would like to create a network map that can recognize that computers where physically located in our building based on our IP address. If a computer takes the space, then it gets a new IP address, in this way an IP address has been assigned to the physical location, and is not a MAC address or computer. Other suggestions for being able to identify this computer are physically located, if my IP address idea is absurd, You need an IOS that supports your switch; You should also issue DHCP with your switch Let's say you got Vlan120 in Fa1 / 0/1 and Fa1 / 0/2 . IP uses DHCP client-ID client -IP IP DHCP customer-ID interface-name IP DHCP out-of-address 192.0.2.1 192.0.2.10! IP DHCP Pool VLAN120 Network 192.0.2.0 255.255.255.0 Default Router 192.0.2.1 DNS-Server 192.0.2.5 Reserved-Only Address 19.0.2.101 Client-ID "FA1/0/1" ASCI Address 192.0.2.102 Client-ID "FA1 / 0...

- Where Developers Learn, Share, & Build Careers

Everything was working fine for 3 months, now suddenly when I open Visual Studio, all this untouched Add files to the root solution folder Close VS 2010 Use the Turtle HG workspace to forget the files added by VS2010 when it HG, ie bin and obg folders are included in. Opened Adding all the files back to HG is being started, it appears that when the "Preparation of solution" dialog appears I To include "bin" and "obz" in the root folder, but it is being ignored by the VS. Why is any thoughts happening? Instead of including the following, try editing your unseen file: AP / B [/ B] in / [DD] Euggets * / OBJ / [Sometimes the capitalization can change (I do not remember what is the reason for it ..)

javascript - Register an Event inside an XTemplate - Sencha Touch 2? -

I'm trying to set up my controller to respond to events Ext.XTemplate And to avoid this, the hassle of writing a bunch of hacked javascript Unfortunately, I can not find a way to either 1) Log on one click event or 2) Use componentQuery to register XTemplate : {reportChooser: 'xtemplate [id = jobReportChooser]'}, control: {reportChooser: {tap: 'OnAnonymousTap '}}}, Is there a way to do this in the controller or at least listen to the audience? I could not find a direct reference because there is no built-in event in XTemplate But here's a nice solution that's a bit cleaner. To start the method get started: function () {this.element.on ({tap: function (e, Dom). {Var El = Ext.get (e.target), elParent = Ext.get (e.pare NT), fireworld; Window.jobAction = this; Window.jobEl = el; If (el.hasCls ('Job- Start ')) L. Parent (). Hackles (' Job-Start ')) {fireEvent =' start '; } And if (L HASCLS ('Job-Hold')...

eclipse - Android: resources unavailable from library project(s) app -> liba -> libb -

All, I am trying to use an existing open-source project (we A) As a library, Project A comes with its own Library Project (B) inside my app. The project is a compilation and runs just fine; However, when I try to use A in my A (I have examined 'Library' within A and added A in my A) I get many errors, "No resource identifier was found for the attribute 'X'in package ... "These special properties exist within B. I also checked that they were added to R in A, and in fact, they were. My question: Why does not my app know that these resources are present? I have searched everything and found in a similar situation like me: But I do not think any of my resources is the same . I am using Eclipse with ADT v20.0 I appreciate any help! EDIT: If this is useful, then I'm trying to use OpenSource app AnySoftKeyboard (ASK) I have tried to create a new project and add ASK as a library Have tried - no dice. EDIT2: A part of asking a library is neces...

How do I add a "class" to a ChoiceField in Django? -

मेरे पास मेरे Django फॉर्म में ChoiceField है: सेक्स = फॉर्म। चार्जफिल्ड (लेबल = '', विकल्प = एसईएक्स) मैं एक class attr को जोड़ना चाहता हूं क्षेत्र तो मैं इसे शैली कर सकता हूँ निम्न में से कुछ ऐसा आमतौर पर काम करता है: forms.Field (लेबल = "प्रदर्शन नाम", help_text = '', widget = forms.TextInput (attrs = {'class': 'wideInput'} )) लेकिन यह चॉइसफिल्ड के लिए काम नहीं करता, मुझे निम्न त्रुटि मिलती है: प्रकार एरर: init ( ) को मेरी चॉइसफिल्ड में क्लास को जोड़ने के लिए एक अप्रत्याशित कीवर्ड तर्क 'एटर्स' क्या widget का उपयोग करना चाहिए? मुझे जल्दी से पढ़ा था जो कि विजेट के बारे में खरगोश है - जाहिरा तौर पर वे एक HTML इनपुट तत्व का डीजेंगो प्रस्तुति विजेट एचटीएमएल के प्रस्तुतीकरण को संभालता है और फिर प्रत्येक प्रपत्र फ़ील्ड विजेट से बंधा है - इस पर पढ़ा हुआ है: के लिए च्वाइसफिल्ड, डिफॉल्ट विजेट "चुनें" (जैसा कि ऊपर दिए गए लिंक में बताया गया है)। ठीक है, सही विजेट को जानने के लिए, मुझे बस...

c# - System.Drawing.Bitmap contains more data than expected -

I have a way to copy data from a system. Drawing Bitmap that looks like this: var readLock = image.LockBits (new rectangle (0, image, image, image. Height), ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb); Byte [] data = new byte [3 * image. With * image height]; If (data.long! = ReadLock.Stride * readLock.Height) throw a new invalid operation exception ("wrong number of bytes"); Martial Copy (readLock.Scan0, data, 0, data. Lang); Image.UnlockBits (readLock); It is very easy, and it works for most of my images, although it affects the exception of a very small image (14x14). In the unsuccessful case, Stride is 44, 42 (14 * 3) is not expected. The pixel format format is 24 bpRGB, so the image should have three bytes for each pixel. Where are these extra bites coming from, and how can I deal with them while processing image data? To keep an eye on someone, I'm generating normal data from the altitude, so I should be able to get every pixel and its neighbor...

bash - Curl - Exclamation mark in User Auth/Password -

There is a problem with curl and HTTP user and password method methods, this exclamation mark is not liked, I tried Avoid the following ways: Tried and failed ... / usr / bin / curl -u 'Username: Slash with: PasswordWithExclaimation!' Slash with http: //test.com/ / usr/bin/cURL-uUsername \\ Passwordwidth Exclamation \! Http: //test.com/ is not working for the default or digest if it uses (cases - -) ... is being deprived of 401. .. What am I doing wrong? slash with curl -u username \\: passwordwidth exclamation \! Http: // .... works fine. received / HTTP / 1.1 authorization: Basic VXNlck5hbWVcV2l0aFNsYXNoOlBhc3N3b3JkV2l0aEV4Y2xhbWF0aW9uIQ == User-agent: Curl / 7.21.0 Host: teststuff1.com:80 Accept: * / * which "slash with the username": PasswordWithExclaimation! " In AUTH string.

osx - How to change kernel settings, shared memory configuration? -

I am trying to install PostgreSQL and I need to allow more shared memory configuration. Post GraceQL documentation here: I just want to find a file named /etc/sysctl.conf , but I have a hard time getting it. But I think that you can say that I'm new to computers, and I do not know how to find this file on Mac, and Google is not helping it. Any and all help is appreciated. First you will need to start the terminal, press cmd + space to start the spotlight search again Enter the term and terminal will be one of the top moss matches. Click it to start it. At the terminal you will have to start an editor using the root account and open the file. You can do this by typing: sudo vi /etc/sysctl.conf This will require your password before raising the root account . After that the editor vi will open the specified file or create a new file if it is not already present. Now they are a bit difficult to use for those people who do not know here, so this is a very quick ...

html - Centered and fixed header -

I am working on my portfolio: I want to focus the text 'Brian Bell' Yes it is, but it can also be fixed when a user scrolls. What is the best way to get it? Thanks a lot! #header {status: fixed; Text-align: center; Width: 100%; }

.net - Update ViewModel from View -

Is there an event or way to know the trigger, when View is updating / updating via modal view? INotifyPropertyChanged and PropertyChanged is used when ViewModel updates the view. But is there any reverse? Changes to the scene from the scene will also trigger PropertyChanged because they Set.

c# - Rows cannot be programmatically added to the DataGridView's rows collection when the control is data-bound -

I have a grid and when the data is loaded into the grid; I just select a line and press the Edit button, on the new form is opened, and the values ​​of row cells are passed to control the sub-form. But, when I change some values ​​of sub-values ​​and save them to take a place in the grid, then I come to: Data minimized control Then the rows of programmatically databagrid rows Can not be added to the collection. What is the cause of this error and how to remove it. The reason for this is that "the line program can not be programmed by the collection of datagrid rows of datagrid added to ". It is as clear as crystalline water solution ? Do not add rows to the DataGridView rows collection, add them to the underlying data source archive (the collections that you are setting in DataGridView's Data Source Processing)

Initialize scala class with self type dependencies from java -

I am working on a project that contains both scala and java code, I used to type Java in the Java code Want to use I think Scala class has some self-dependent dependencies. While creating a new example of that class from Java, I do not know how to give them. Features Deps1 {def dep1 = println ("Dep1")} attribute Deps2 {def dep2 = println ("dep2")} class {test class}: Depp1 with Deps2 = & gt; Def Test = {dep1 dep2}} If I am making an example of TestClass then I will use the new test class with Deps1 with Deps1 I can but I do not know how to do this in Java code. I am using Scala 2.9.2. Can anyone help me on this? If the symptoms are all complex, then Scala is the best to handle them. Expand Test Class with Deps1 Class TestWithDeps Depp2 Write a stub in Scala:

c# - Reporting tool in ASP.NET -

I am using ASP.NET/C # . I do not have any reporting so far in the project. Although I used the report viewer and the report wizard to create a sample report. I successfully sent a report . In my experience with that simple report , I had to face some problems. The report was not the same in other browsers, the height in FF was a problem. Reports in Opera have decreased and are not readable. Apart from this, toolbar changes. This is a bit hard to make the report dynamic. I also use MS SSRS as another option. I did not try it So I have to ask which code should I choose? What is MS SSRS a good option? Is this compatible browser compatible? Can anything be told what the report is to use the OLLs they use in their projects? Links to start with Visual Studio 2008 with MS SSRs will be highly appreciated. I would suggest you go with SSRs as a reporting tool in your project. Yes, this cross browser is compatible. If you are working with...

android - SIP to SIP Call recording -

How can we record SIPs to make SIP calls in Android? How to get downlink and uplink access in Android using native code? Take a look at This is an open source project that has the features you are looking for. Generally, this PGSIIP uses the SIP stack which runs on native code. You can ask questions in your mailing list. It is very active.

html - CSS: Setting vertically in middle -

Image
निम्नलिखित पर विचार करें: & lt; div class = "wrap" & gt; & Lt; div वर्ग = "बायां" & gt; & lt; / div & gt; & Lt; div वर्ग = "सही" & gt; & lt; / div & gt; & Lt; / div & gt; बाएं div में सही div से कम ऊंचाई है क्या मैं सही div के बीच में बायीं तरफ खड़ी कर सकता हूं? मैं मार्जिन-टॉप सेट नहीं कर सकता क्योंकि ऊंचाई भिन्न होती है। यहाँ jsfiddle लिंक है: हाय अब प्रदर्शित इनलाइन और वर्टिकल-संरेखित करें को दें और float को इस तरह से हटाएं । लपेटें {अतिप्रवाह: छिपा हुआ; सीमा: 1px ठोस लाल; चौड़ाई: 250px; प्रदर्शन: तालिका; } .left {width: 100px; ऊँचाई: 50px; पृष्ठभूमि: पीला; display: inline-ब्लॉक; ऊर्ध्वाधर- align: मध्यम; } .right {width: 100px; ऊँचाई: 100px; पृष्ठभूमि: भूरे रंग; display: inline-ब्लॉक; ऊर्ध्वाधर- align: मध्यम; } लाइव डेमो

sql - Inserting Record by looking up in another table(Access 2007) -

I have the datagrid view queue, which has three string values. These values ​​should be seen in the product table to find related product IDs. Then this relationship will be put on the table. I am looking for the best query to get it. Here is my product table ------------ + -------------- + | Product_id | Product_name | + ------------ + -------------- + | 1 | Foo | | 2 | Bar | 3 | Falcon | | 4 | New product | + ------------ + -------------- + And I'm trying to put in the connection table I + ------------ + ---------------- + -------- - -------- + | Product_id | Relatedproducts_id | Relatedproduct_id2 + ------------ + ---------------- + ----------------- + | 1 | 2 | Empty | | 2 | 3 | 1 | | 3 | Empty | Empty | + ------------ + ---------------- + ----------------- + Below is a table, this is a sample datagrid view queue. + ------------ + - ------------ + --------------- + | ProdName | RelProd_Name | RelProd_Name2 | + ------------ + -------------- + --------------- +...

Could I use interactive proxy authentication with git-svn? -

I am behind an authentic proxy and use a remote SVN repost at https using git svn The proxy in my ~ / .subversion / server file is defined. When I start with git svn fetch The RA layer request failed: '' / P> Options: OK ~ / .subversion / servers → Everything works fine. However, I'm a little bit uncomfortable, my domain stored credentials in a plain text file on my hard disk. There are other methods ( especially interactive ones )) to prove on my proxy when using git svn on Https Information: PC where it should be completed, it is in the Windows domain and authentication is done with NTLM. If ntlmaps are not incorrect, then you can add domains by dragging the login form windows Anyway if that works, you can ask NTLmaps for a password at the start time

android - How can I display a formula in TextView -

Image
How can I display such a string in TextView . I tried a lot but the solution could not be found. I can not display the base value CHA2DS2-VASc I suggest you create an HTML string for this formula and display it inside textview: string formula = " CAA 2 DS 2

static typing - Definition of statically typed and dynamically types -

Which of the two definitions is correct? Static typed - Type matching is checked at compile time (and can therefore only be applied to compiled languages) Dynamically typed - Type Match is checked at run time, or not at all. (This term can be applied for compiled or interpreted language) Staticly typed - assigned to type variable So that I will say 'x type int' . Dynamically typed - types are assigned to values ​​(if at all), then I would say Which is correct, or is not quite right? Which is correct, or is not quite right? The first pair of definitions is close, but not quite right. Static typed - compile time of type matching (and therefore can only be applied to compiled languages) It is difficult, I think that if any language was used, but the type of investigation was done before the execution began, then it will still be typed steadily. OCaml REPL, an example of this, leaves almost technically compiled (and type-check) source cod...

- Where Developers Learn, Share, & Build Careers

I have several spring beans in which the property value is the same for all of string . Is there any way where I can define string in XML at one place and can reference it in all the beans on the value settings of the property? & lt; Bean id = "some bean" class = "test.SomeBean" & gt; & Lt; Property Name = "Property 1" Ref = "Some Value" & gt; & Lt; / Property & gt; & Lt; Property Name = "General Property" Value = "General Value" & gt; & Lt; / Property & gt; & lt; Bean id = "next bean" class = "test.extBean" & gt; & Lt; Property name = "property 2" ref = "some value" & gt; & Lt; / Property & gt; & Lt; Property Name = "General Property" Value = "General Value" & gt; & Lt; / Property & gt; How to set commonValue in a different place and see it in both places? Try...

java - replace substring using regex -

मेरे पास एक स्ट्रिंग है जिसमें कई & lt; xxx & gt; मान हैं। मैं & lt; & gt; के अंदर मूल्य को वापस लेना चाहता हूं, कुछ हेरफेर करना और स्ट्रिंग में नया मान फिर से डालें। मैंने जो किया है इनपुट = यह & lt; abc_d & gt; एक नमूना & lt; ea1_j & gt; इनपुट & lt; lmk_02 & gt; स्ट्रिंग करते समय (इनपुट। मैट्स ("। * *; & Lt;। [[\ S] [^ & lt;] & gt;। *")) {Value = input.substring (input.indexOf ("& lt;") +1, इनपुट .indexOf ( "& gt;")); // मान इनपुट = input.replaceFirst ("& lt;। + & Gt;" से छेड़छाड़ की गई मूल्य, हेरफेर किए गए मूल्य); } लेकिन पहले पुनरावृत्ति के बाद, मान में abc_d & gt; एक नमूना & lt; ea1_j & gt; इनपुट & lt; lmk_02 मेरा मानना ​​है कि सूचकांक ("& gt;") "& gt;" का पहला सूचकांक देगा मैं कहाँ गलत कर रहा था? आप जो करने की कोशिश कर रहे हैं वह पूरा करने का यह एक आसान तरीका है: स्ट्रिंग इनपुट = "यह & lt; abc_...

C/C++ Framework for distributed computing in a dynamic cluster -

I am looking for a framework to use in a C ++ distributed number crunching application. Setup looks like this: A master node that breaks the problem domain into small independent tasks. Work has been built in different capacities of worker nodes (such as CPU type / GPU-enabled). Work nodes are dynamically added to the calculation grid, because they are available, it can also be that a worker node dies, without saying goodbye. To complete this setup I am searching for a fast C / C + + framework. In short, my main requirements are: Worker / Work Dynamically add / remove nodes Target Network: 1G - 10G Ethernet (corporate network, good performance is not required on the internet) Optional: Encrypted and certified communication What you definitely want to do with you MPI-2 added dynamic process management features and I Most of the deficit that is currently widely used to be Lagukrnon made the offer in. One advantage of using C ++ + MPI is that combining scienti...

- Where Developers Learn, Share, & Build Careers

Where can I get the PRCA PKCS # 1 V2 implementation in CSIL? I have found an implementation, but I'm not sure that it fits with that standard. Can anyone explain key differences between the different implementations of the RSA algorithm, which could be the reason for inconsistency in the operation? RTA algorithm is a primitive you can use for two purposes: Privacy ( I.e., public key encryption), or the original proof (which is, the digital signature is mixed with a cryptographic hash) PKCS # 1 Most people refer to RSA-based encryption and signature nowadays. More specifically, PKCS # 1 (2.1) The most recent version defines four different plans: PKCS # 1 v1.5 encryption (for purposes of inheritance only, no one should use it anymore) OAEP encryption (to be preferred for any new implementation) PKCS # 1 v1.5 signature PSS signature In other words, when you say " RSA PKCS # 1 v 2.1 ", then you can change any of the above schemes Because the...

dynamic - Getting table height dynamically in iText -

Is there a way to get the height of the table before adding it to the document? At first glance, I think the number of rows in the table is enough to calculate the height because I know the size of the font. However, some lines broke that rule. For example, a cell can store a paragraph that contains more than one row. Therefore, what I should know, is the total number of heights of each row. Yes, the answer was not complex. To get the height of the table, first the width of the table must first be set. In other words, table.setTotalWidth ((PageSize.A4.getWidth () - document.leftMargin () - document.rightMargin ()) * table.getWidthPercentage () / 100); Println (table.calculateHeights ()); Gives the height of the table.

- Where Developers Learn, Share, & Build Careers

I am using ASP.NET/C # . For the first time I am doing reporting in asp.NET . I . As far as I am understood that it requires a separate report server , it will be created to work for it. We do not want to create a separate reporting server . Can someone make SSRs report locally without making me a separate server? Any suggestions are welcome. The Visual Studio 2005 Report Designer supports locally executed reports, which has an RDLC extension. MSDN: See also

android - onActivityResult is not called -

I need to send a byte array from any activity to another. I have something like this: Activity1 - & gt; Activity 2 - & gt; I am creating a photo and I want to send the byte [] image data to Activity1 to display it. For this, I have 2 in Activity 2: Camera. Illustration Callback mPictureCallback = New Camera.Picture Callback () {Zero Drawing on Public (Byte [] ImageData, Camera c) {if (imageData! = Null) {Lephoto = 1; PrefsEditor.putInt (TAKEPHOTO, TEKPHOTO); PrefsEditor.commit (); System.out.println ("image data in tech PHOTO" + image data); Intent mIntent = new intent (); Bundle B = new bundle (); B.putbyteArray ("imageData", ImageData); MIntent.putExtras (b); SetResult (FOTO_MODE, mIntent); End(); } MCamera.startPreview (); MPreviewRunning = true}}; In Activity 1 , on onactive result () I have it: @ Override Secure Zero OnActivityResult (int Requestcode, Integer Results Code, Intent Data) {takephoto = myPrefs.getInt (TAKEPHOTO, 0);...

- Where Developers Learn, Share, & Build Careers

Is there a technology that can be used to simulate multiple cluster indexes on a table in Sibyl 12.5? Thank you I do not think you can simulate multiple cluster indexes because when you have created in the table If there is a package index, then the data is rearranged according to the data in the compressed index column. Logically you can not arrange the data in any other order according to any other column. Whatever you can do is create a non-clustered index for the other column. Whatever you can do is combine two or more columns and create a package index

- Where Developers Learn, Share, & Build Careers

I have tried some forum pages and searched the stackoverflow for the same thing, but I could not find the solution. I used the code below to generate registration ID for GCM notification. But I get an empty string as a registration ID: GCMRGISTARS; CheckDivis (this); GCMRegistrar.checkManifest (this); if (gcmrgistarar.ICr registered (it)) {log d. ("Information", GCMRGistAir.Jet Registration Registration (this)); } regId = GCMRegistrar.getRegistrationId (this); Logs. V ("log", "register id oslo:" + regId); If (regId.equals ("")) {// This project ID GCMRAgstarber Replace it with the registrar (this, "718437041388"); Log D. ("Information", GCMRGistAir.Jet Registration Registration (this)); } Other {log d. ("Information", "pre-registered" + regId); } Please help me with this, tell me that I have anything wrong. Thanks in advance, Nirvana. must not have a registration ID after GCMRegistra...

- Where Developers Learn, Share, & Build Careers

I'm new to C # and thinking that list1 is actually removed from memory after list1 = null; from the list & lt; String & gt; List1 = New list & lt; String & gt; () {"Carrot", "fox", "explorer"}; & Lt; String & gt; List2 = New list & lt; String & gt; (); List2.Add (List1 [0]); List2.Add (List1 [1]); List2.Add (List1 [2]); List 1 = null; This code is for documentation only, in my real case the list item 1 is really big, and I need to remove it from memory, and only with list 2, this original The fraction of list 1 is. . I accept the list 1 [0] and the list 2 [0] is referring to the same object in memory until I update 2 [0] with the new value. .. Is it true? There are many questions I have to try to answer them differently: Did the list 1 be removed from memory when the reference to list 1 is set to empty? No, the collection has been removed from the list when the garbage collector is cleaning the hea...

Fade effect of nivo slider -

When I use the Fed effect my slider does not work properly but with another effect, everything Okay. Now, I am using the Fed effect: But the picture changes every time. If I click on the second dot, the picture can not be changed: But if I use the second effect, example it is doing a great job. I do not know why, please, help me!

Microsoft LDAP schema case sensitive -

Is it possible to be compelled to be schema case sensitive? I know that this is set by default in IBM TDS and you need to set it manually to change it. The syntax of an attribute (defined in schema) stops the data type and structure of an attribute value. Comparison (for example, case sensitivity) is not provided by syntax, but through different matching rules Some matching rules are case-sensitive, nothing is there. The LDAP-Compliance Server supports an extensible matching filter that can be used to specify the matching rule used by the server if a specific type of comparison is required. For example, filter: (cn: caseExactact = Darth Vader) will evaluate to true if CN The property of an entry exactly matches the case. In summary, attribute values ​​are not global, nor are they case-sensitive or case-insensitive, the value of an attribute type is constrained by the syntax, and matches the rule of match.

Invoking secured web services using wso2 esb -

I am trying to use secure web services through WSO2 ESB A request is received from the web service, use the sequence, implement the XSLT moderator, create the necessary request to kill the endpoint. I can do this successfully by making a request for unsafe end points. Various security policies (example: X509 username, token, etc.) thanks How can I create requests > Take a look at this sample. You need to secure outgoing request messages at the out point level. Please take a look here. [1]. [1]

SQL relational database - table names in a table -

मेरे पास ये टेबल हैं डेटाटाइप नाम सारणी नाम ------------------- पशु आंकड़ाअनुभव वाहन डेटाविहिल डेटाविहिल आईडी का नाम स्पीड ------------------- 1 कार 10 2 बाइक 2 3 हार्स 4 डेटाअनिमल आईडी का नाम ImageFile ----------------------------- 1 गाय गाय। जेपीजी 2 भेड़ sheep.jpg 3 सुअर पीर। Jpg क्या डेटाैट कॉलम टेबलनाम और उस नाम के साथ सभी तालिकाओं के साथ संबंध बनाना संभव है ? नहीं, बस किसी भी SQL डेटाबेस में संभव नहीं है। संबंध, तालिका और स्तंभ नाम गतिशील नहीं हैं - इस संरचना के आधार पर क्वेरी करने का एकमात्र तरीका उपयोग करना है, जो जटिल है और खतरे के साथ आता है जैसे। आपको अपने डिजाइन या दृढ़ता प्रौद्योगिकी की पसंद पर पुनर्विचार करना होगा।

- Where Developers Learn, Share, & Build Careers

I'm trying to make a decision on the set of devices that are used to build a new web app. I want it to be really interactive and work using Ajax (i.e. page refresh etc.). It will also have a UI for mobile devices like iPhone I want to implement it via PHP, MySQL and Javascript, the main reason is that I know and I can easily host it somewhere Do I have any ideas for using any device? At this time I am thinking: - For PHP - Yii - For JavaScript - Knockout.js and jQuery - For mobile - jQuery for mobile My concern is only Yii And using knockout together, is it slightly higher with two MVC frameworks? Should I also consider more about HTML5? The knockout is on the client side, and this is the MVVM - model-view-view-model. You can update the knockout model through AJAX json from Yii controller, and update the knockout user interface accordingly.

How to substract numbers within a string in PHP? -

Say a string variable containing data data, say $ x = "OP / 12 / DIR"; The status of the number data can be changed in any case by changing the user's application to the will of the user, and slash bar can be replaced by any other character; But number data is mandatory. So what's the way to extract the number data from the string? Change everything that is empty with no space string. $ numbers = preg_replace ('/ [^ 0-9] * /', '', $ x);

database - c# asp.net waiting for state in db to change -

I am creating a web application where a job presented by a user is controlled by the background service and the web app and background Between the communication service is done on the database so when a search begins, the web application inserts a record in the DB and waits until the status area of ​​record changes. As I understand, if I apply it to the request thread, then I am unnecessarily blocking one of the pool threads, but it can not do my head asynchronously. What is the best practice in this case ? If you use SQL Server as your DB then you can call a SQLDependency Use the ADO.NET utility, When a properly set up occurs, then what is the dose, whenever there is a change in the table (which you will configure) a C # event will be picked up Note: You have to setup your SQL Server to enable it.

To apply onclickListener on GridView in BlackBerry -

I added a grid to 9 pictures and clicking on any image, I was trying to navigate to some page Am But I'm not able to set up a listener on GridField Manager. I tried the following code: grid.add (bmp1); Grid.add (bmp2); Grid.add (bmp3); Grid.add (BMP4); Grid.add (bmp5); Grid.setChangeListener (new field change listener); (Grid); } The square changes the field changer execution Field Change Listener {Public Zero Field changed (Field Field, Int arg1) {/ TODO Auto generated method Stub system. OutprintLine ("Inside Method:" + Field. If (Field == BMP1) {Dialog.alert ("1 Clicks");} If (Field == BMP2) {Dialog.alert ("2 Clicked ");} if (field == BMP3) {Dialog.alert (" 3 is clicked ");} If (field == BMP4) {Dialog.alert (" 4 clicked " );} If (field == BMP5) {Dialog.alert ("5 is clicked");} A manager is used to arrange the field of its own focus And not getting clicks (normally). Note and use field to get the clicks ...

- Where Developers Learn, Share, & Build Careers

Deploying a lot of Django apps for the use of Amazon 2, the HTTP server NGINX and the Gnichorn I Wondering what they really did and why both are used in parallel, what is the purpose of running them in parallel? They have not been used in parallel. NGINX is a . It is in the first line, it accepts incoming connections and decides that they should go to the next location. It (generally) works like static media such as CSS, JS and images. It can do other things like encryption SSL, caching etc. Gunyornorn is the next layer and one is . NGINX sees that the incoming connection is for www.domain.com and they (through configuration files) know that it should pass that connection to Gunicorn Gunicorn is a server which basically Simple and universal interface between web servers and web applications or frameworks Gunicorn's job is to manage and run Contrary to this setup, Apache is used with the mod_wsgi module To do In this situation, Aperture Server is actually ...

jquery - OnChange event succesfully completes but renders other elements useless -

I've been trying to fix this problem for the last 2-3 hours, but in the end left. This is part of my JavaScript / jquery $ (function () {$ ('' ob '). ); Var form_data = {id: id, ob: 3}; $ .ajax ({url: "changeinfo.php", type: 'post', data: form_data, success: function (data) {$ ("# finfoob3 ") .html (data);}}); details are false;});}); The above successfully modifies a DIV element on the change. However in that div element, there is an ID = obt3 button that does not work. Actually, this name was written on something else. I have sent another post value OB to call AJAX and have included it with receiving so that it is obt3. I then put the button to get the ID but it still will not respond to a click event. I tried to check the element with Google Chrome and the ID of the element was successfully converted into obt3, but it will not be answered on click event. The problem is that when you changed the contents of #finfoob3 Wi...

Is it possible to avoid the build before running the unit testcase in visual studio or resharpher -

Consider that I am only changing a single test / united project, and if I try to run it This unit creates a test project (accepted) and all other dev projects (which are not really necessary). How can I avoid this? I have 100+ projects in my solution, so the case of each unit testing has actually been running for a long time due to project construction. Are you using the accessories? MS Accessories can force all "accessor-dependent" projects to rebuild, which can be forced to rebuild all the solutions PS This should be a comment on your answer, but add a comment to me There are not enough representative points for.

sh - bash sequential execution timeline -

मान लें कि मैं निम्नलिखित कमांड में टाइप करता हूँ: / usr / local / bin / Wget -O "/storehere.xml" "डाउनलोड 1" & amp; amp; ./parse_xml;/usr/local/bin/wget -o "/storehere.xml" "डाउनलोड 2" & amp; amp; ./parse_xml; डाउनलोड 1 को पुनर्प्राप्त और संग्रहीत करने के बाद मेरी समझ के लिए, शेल parse_xml निष्पादित करेगा। हालांकि, मेरे लिए यह स्पष्ट नहीं है कि डाउनलोड 2 के लिए अगला wget कमांड कब होगा? Parse_xml निष्पादित करने के बाद (बेशक पहली बार)? या parse_xml निष्पादित करने के अनुरोध के बाद बनाया गया है? अगर जवाब यह उत्तरार्द्ध है, तो मैं अगली wget निष्पादित करने से पहले parse_xml से एक वापसी कोड के लिए मेरी स्क्रिप्ट की प्रतीक्षा करने का एक तरीका जानना चाहूंगा। धन्यवाद। आपके मामले में, प्रत्येक कमांड को लागू किया जाता है और अगली कमांड लागू होने से पहले सफलतापूर्वक (या असफल) हो जाता है। स्पष्टीकरण: एक पंक्ति पर अलग-अलग आज्ञाओं को डिमरेक्ट करने वाला & amp; amp; amp; & amp; amp; & amp; amp; & amp; amp; & a...

java - Accessing files from other filesystems along with hdfs files in a hadoop mapreduce application -

I know that we can reduce the map with a normal Java application. Now in my case there are also HDFs and files on other filesystems to deal with files to reduce jobs. Is it possible that we can use files from other file systems, while simultaneously using files on HDFS. Is this possible? So basically my intention is that I have a large file that I want to put in HDFS for parallel computing and then compare the blocks in this file with some other files (which I Do not want to put in HDFS code, they need to be used once as a full-length file. You can use the files in your In order to distribute them, they can open and read the file in the Configure () method (do not read them in map () because it will be multiple times . Edit Reduce the job to access the file from the local file system in your map, you distribute those files You can add cache to when you set up your job configuration. JobConnect Job = New JobConf (); Distributed Cache.AdcacheFile (New URI ("/...

No Eclipse console output window (Java)? -

! [ The image tells me what the console output gives me I checked the error file and there are no errors? Was it working 5 hours ago? When I run them, I give exact identical console output to different types of programs. This is AquawileTystem executing the main method Stderr output

- Where Developers Learn, Share, & Build Careers

I have millions of lines on which I need a process. Each line in the file will result in an HTTP call. I am trying to figure out the best way to attack this problem. I can clearly read the file and call it sequentially, but it will be incredibly slow. I would like to call parallelize, but I'm not sure if I am not a big fan of the whole file into memory (something) I am reading (or who do not want me to try as well to parallelize read the file The best way to attack this problem is to find some ideas here. If there is an existing structure or library that does something similar, then I am also happy to use it. Thank you. I would like to call parallelize, but I'm sure If I'm not supposed to read the entire file into memory you must have a executor Services using an enclosed block queue As you read in your million lines, you submit a job in the thread-pool until the block queue is complete. 100 will be able to run together simultaneously without having...

soap - PHP SoapClient: Get list of all functions with parameters -

I am consuming a SOAP web service from a third party vendor, and with some work to change the service Problems are coming randomly (named parameters, parameters added and removed) Clearly, this is not what we want to see, so whenever I am trying to write a script to notify me in the webservice switch. Using PHP's Soap Client, I can drag a list of all the functions to the webservice, though all the functions are a list of parameters that appears to be the container for the remaining parameters. I have SOAP clients in the WSDL mode , So I think there is no way to pull a full parameter list for each function. Any advice? With the entries of some of the above comments, if you have methods / parameters to meet your needs SOAP client could not find the exact reflection of, then surely you have nothing to stop it while taking a hashed from the WSDL, and it has made you compare with a hash, whether there is any change or not. If you want to get more detail on what's the ...

- Where Developers Learn, Share, & Build Careers

After I have a dataset that is made up of a number of rows and columns such as a1 B1A2B2B3A3A4B4A5 B5 I want to type the code that loop through the cells once it's (A2-A1) One column in the calculation of an index / (A2 + A1). I want to save the result to Sheet 2. I have used this code but I am getting an error where it breaks on where I am trying to save the result for Sheet2 I help Need to fix this code:. Sub-combination () dim the range as jCell Range dimmer in the form of Kcell in each JCell ActiveSheet.UsedRange result in ActiveSheet.UsedRange results for each Kcell = Double Sheet2.Cells.Clear (JCell.Value - kCell.Value) / (jCell.Value + kCell.Value) Sheet2.Cell ("Result"). Value = Sheet1.Cell ("Result"). Price Next Kcell Next jCell End Sub Thanks in advance One is that I've never seen the syntax like this:. Sheet2.Cell ("Result") value = Sheet1.Cell ("Result".). The second is that string type data eg ...

Batch File to remove first 3 lines of csv file -

I'm looking for a way to remove the first 3 lines of text from a CSV file, call reports. A batch script My CSV has 3 header lines ReportName's time & lt; Blank line & gt; Do anyone know how I can complete it and just change the original file? Unless you have a true CSV, and there is no tab delimited file, do the following (A tab will change in 8 places) @echo off set "csv = test.csv" more +3 "% csv%" & gt; "% Csv% .new" move / Y "% csv% .new" "% csv%" & gt; Nul If your file contains tabs, and you do not have to protect the empty lines, the following will work, but this is slow. @echo set off "csv = test.csv"> For "% csv% .new" (/ f ^ ^ ^ 3 ^ usebackq ^ delims ^ ^ EOL ^ = %% ("% csv%"), %% A copy) / y "% csv% .new ""% csv% "& gt; Null

php - Doctrine2 querystring query -

Currently I am developing a relaxing-ap-app with symphony 2 and theory 2. My APIs have the functionality to filter results by a quickstring. For example, the following URL: http://example.com/api/users?orderBy=username%20DESC&limit=20 I query string to Parse_str ($ This- & gt; getRequest () - & gt; getQueryString (), $ queryString); Is there an assignment for an assoc array that I can commit to the array and the theory selects this result? Something like $ users = $ this- & gt; GetDoctrine () - & gt; GetRepository ('UserBundle: User') - & gt; FindByQueryString ($ queryString); Like AdrienBrault has said that the use of parse_str can not be used by the Keep it in your controller instead: $ order by = $ this- & gt; Receive ('request') - & gt; Query-> Receive ('Order By'); $ Limit = $ this- & gt; Receive ('request') - & gt; Query-> Get ('border'); $ Rep = $ this- & gt; GetDoctrine...

- Where Developers Learn, Share, & Build Careers

I would like to grep to dig through my code hierarchy and search the word "x", but the result is color and annoying Skip the words I do now: grep -Rn --color x * | The problem is that the matching color loses color because of the pipe. Is it any way to make a statement, so do not lose color? specify : grep --color = always x * | Grep -v -e html -e svn -e test -e doc -ey and afterwards if you need the result in a file pipe and removing the characters that fall in it This format color is required, here is a nifty CAD script, so that you can pipe your result to remove the pipe savers: sed -r "s / \ x1b \ [([0- 9] {1, 2} (; [0- 9] {1,2})?) [M | K] // g " (Meditation Please give you the option of -E instead of -r for OS X)

Ruby on Rails: Splitting out lat and long from -

I have this code: include Geokit :: Geocoders res = MultiGeocoder. Geocode ('100 Spear St, San Francisco, CA') puts res.ll The result will be something like this: 37.7922379, -122.3939656 I need it So, lat = some tall = some I think it works? res = late long strong (',') lat = latLongArray [0] long = latLongArray [1] / code> Not the best Ruby code? Any help appreciated. You can use it: lat, lng = Res.ll.split (",")

html - List of - hidding beyond a certain point -

मेरे पास & lt; header & gt; 20 & Lt; li & gt; & lt; / li & gt; 's साल में 20 साल पीछे जा रहा है। हेडर के भीतर मैं 2012 के साथ 100% स्क्रीन चौड़ाई के वर्षों के साथ और lt; li & gt; दिखाना चाहता हूं ऐसा करने के लिए कोई आसान तरीका है? मुझे वास्तव में इसे एक लंबी क्षैतिज रेखा की आवश्यकता है क्योंकि मैं बाएं बाईं ओर मंडप पर एक लंबवत प्रभाव पैदा करने जा रहा हूं। ली {प्रदर्शन: इनलाइन-ब्लॉक; चौड़ाई: 5%; पाठ संरेखित करें: केंद्र; }

browser - How to get network activity from Java applet? -

I have a third party Java applet that is loaded through the browser and some network activity (do not know that In fact, maybe http requests, maybe https). How will I trace that activity? I just need the header, not its content thanks. This is a basic sniffing and it is neither related to Java nor Applet for a job An ideal tool you can use (Windows only) or you can check http (s) activities with a few more things.

sql - nested cursor, code won't update table outside of cursors -

I'm working on the nested cursor. Does not update my update statement table leading cancer let me know that all looping is working because the print statement will print, but some edu_suffix_stage_test does not update I can expect is a suggestion I am! For each ID, there is a major line of data, and the year has been achieved that degree. I need string to simultaneously For example, Reed 10013 has two records for two degrees: .. In Civil Engineering '38, and in Civil Engineering '41, I need to make Adhesives, so it is equivalent to "Civil Engineering" of "Civil Engineering'38". finally need a edusuffix per Reid, in edu_suffix_stage_test Thank you here is my code: .. @reid_outside nvarchar announced (20 ), @major nvarchar (50), nvarchar @classof (5), @edusuffix_inside varchar (80), @note nvarchar (select 50), @reid_inside nvarchar (20), @edusuffix_outside varchar (80) education_cursor for Reed Let the cursor declare The edusuffix Edu_...

mapping - Using encoders and robotc to map a line circuit -

I'm looking for a way to use encoder information from motors that allow the wheels of my robot to be a line Circuit . After using a single light sensor after the robot line navigates and on my second lap, I want to know where it is in the circuit. I have read a lot about SLAM but I'm not sure I can apply it with robots and only with encoder information. Any help and advice on the best way to deal with this would be greatly appreciated. N You can use a model to predict your robot's movement. Assuming a vehicle with a favorite forward direction on a plane, you would have (x, y, theta) as your code, and then a state transition based on your encoder values Ho. What exactly does the function actually look like on your robot configuration I remember that there was a good coverage on this topic. You will find many examples on the net, though. Together, localization and mapping (SLAM) will be to use a potential odomockery model, and then there will be some correction b...

web applications - Working with accounts and user generated data in Django -

I have not received any documents or tutorials on this subject, no response has been received on the IRC channel, I think I am wrong I'm looking for cheese. Anyways, after searching for several hours after taking the help of SO, I will try to describe what I am doing after the example: I want to create a web application where the user is created (This part is clear After entering, the user will be able to store their favorite food When a user logs in, Will see the list and it ends up with them I can understand I understand how the user can create a account and log in. But after that everything is blurry. Users After logging in, suppose that it will be presented with the form that it can fill and save. How to recover user accumulated data from the database (i.e. favorite foods)? These Things are I 'as I said I do not have any I have not been described in books, docs or tutorials, which I did. I would appreciate it if you can tell me the right direction. I thi...

php - Responsive Design - Database Generated Icons / Images -

I'm working on a site's home page. We have around 50 large icons / I currently called them out 5 and then I put them in a BR tag to go to the next line (using PHP and a counter). My problem is that the design needs to be responsive so that you can reduce the screen, it will save Fit 3 on the first line and then 2 on the next line will kick the generated PHP tag so that we can find a place. What is the best way to get around this, so every time the size of the screen does any work? I am using twitter bootstrap and ccpip for coding. The best way to see what I mean is on the website: thanks The current PHP code is: // Luping through industry marks and creating a link for them ------------------------------------- ----------------------------------- ------------- & gt; ; If (isset ($ industry_icons)) {$ i = 0; Foreach ($ industry_icons $ industry) {echo $ this- & gt; HTML-> The link ($-> $-> $ ['industry'] ['image_path'], array ('...

- Where Developers Learn, Share, & Build Careers

I try to modify AuthenticatedUser to store a list of AdminRole I am doing Authenticated user is the class used by all my applications; It enters a session when the user logs successfully. Now I want to add a list of authorization roles in the user session. Although each application defines a AdminRole class differently, for example, my data center application store in the database: employee_id role_name site_name receive_email All of my applications will not need the receive_email field or expand their own methods I thought it was called for an abstract class. But Eclipse is complaining about the wrong type on the authorized_fel_list setter in this snippet. DataCenterAdminRoleDAO dcAdminDao = New DataCenterAdminRoleDAO (); {List & lt; DataCenterAdminRole & gt; Authorized_roles = dcAdminDao.getAuthorizedRoleListByBadge (authenticatedUser.getBadge ()); AuthenticatedUser.setAuthorized_role_list (authorized_roles); === class public class authenticatedConfigure e...

How to deny identical images being uploaded with PHP -

I want to search for a directory by Imagetype or similar variable .. before the image is uploaded to that essay My goal is to find Blob of images in that directory with php, and if any result is matched (meaning that there will be duplicate uploads of the same image) of "pre-uploaded file" Will come back together. This is related to image files ... Here is the code that I think I can add .. / / Element (values) $ $ _FILES ['ImageFile'] Array // Let's update your index status by using these values ​​$ image name = str_replace ('', '-', strtolower ($ _ files ['ImageFile'] [ 'Name']); $ image size = $ _FILES ['ImageFile'] ['size']; // Get the original image size $ TempSrc = $ _FILES ['ImageFile'] ['tmp_name']; // tmp file The name is stored in the PHP tmp folder $ ImageType = $ _FILES ['ImageFile'] ['Type']; // Get the type, "Image / PNG", Return Image / JPEG, Text ...

ruby on rails - Params sent are not the same in a backbone's model -

In the application of a simple spinal cord, I have this model: class Rcbvm2.Models item increases backbone. Model Initialize: (ModelName) - & gt; @ ModelName = modelName @paramRoot = @modelName @urlRoot = "http: // localhost: 3000 / # {@modelName}" When I try: items = new Rcbvm2.Models.Item ('pages') item.set ('body', 'test') item.id = 2 item.save () Therefore, a request is sent to my rail application with this request: get started "for" 127.0.0.1 "/ pages / 2" 2012-11-01 19:39: Processing page controller # 40 -0400 as the # JSON parameter: {"pages" => {"silent" => true}, "body" = & gt; "test", "id" = & Gt; "2", "page" = & gt; {"Body" => "test"}} OK, it works My problem is when I do this: items = new RCBVM 2. Model. Item (name) // Model Name Item. Set ('Body' 'Test'). Change the ...