Posts

Showing posts from September, 2014

d3.js - drag circle copies from different svgs to another svg in d3 -

I have different skiubs (SVG1-SVG4), with many circles drawn on them. I can choose these circles individually so that they change in their appearance (fill color). They have also been added to the class. Selected. Now I would like to draw them semi-transparent copies in a new SVG. The original boards should stay where they are. I would like to give the interactive power of pulling several circles on that SVG5 to create a new object on another SVG (SVG5). When they are removed, the copies of the circles should be removed and an indication where users can give more information about new objects in SVG5 should be opened. So I got a new SVG (called SVGcric). On SvgCircles, I have added a group, where I add a circle copy when a circle is selected. I have also added a drag version to the group, which calls a function, where I will change the position of the G element / circle copy. My question is now: Where should I place the status of STVG so that drag-event can be seen and call...

Equivalent of AspectJ call pointcut in PostSharp -

Is Aspex call point in postspark? Concrete: The method foo () on both classes and classbie call classes I only want to block calls from A to C, ATP to C, as it happens in Eptex, Inbound calls can be obtained from: call (* ClassC.foo ()) & amp; ; & Amp; This method is not directly possible as extension calls to a method does not apply to the site itself And such signals will only be able to filter methods, not call sites For possible solutions, two aspects must be cooperated - one will manage a thread-fixed variable, the second, either execute the lost method or do some additional work. However, this is not an ideal solution.

PHP - How to keep a Command Shell open for executing multiple commands? -

Hi, I'm trying to execute several commands using a PHP machine on a Windows machine. I tried this code: & lt ;? Php $ output = shell_exec ("powershell.exe"); $ Output2 = shell_exec ("Writing Host Gokul"); Shell_exec ('departure'); Echo ('& lt; east & gt;'); Echo ($ output); Echo ($ output2); Echo ('& lt; / pre & gt;'); ? & Gt; PHP executes each command with a new shell and closes when it is complete! I think every 'shell_exec' creates a new shell and the control waits until command execution is complete. How can I turn it off until it opens in the background Is not it sure whether 'proc_open' or 'popen' can help? UPDATE When I use PROC_OPEN () $ descriptorspec = array (0 = & gt; array ("pipe", "r") , // stdin, a pipe that will be read from 1 => array ("pipe", "W"), // stadout is a pipe that has a child 2 => array (...

c++ - Fully transparent torus in OpenGL -

Image
I have a Torres provided by OpenGL and can map a texture; There is no problem till the texture is not opaque. But when I make the color selectively transparent, it does not work. Or rather: this works but only in some areas based on the order of the triangle in the top buffer; See the difference with the outer equator Torus should be equally covered by spots . The source image will be PNG, however for now I work with BMP because it is easy to load (Texture loading is part of the tutorial tutorial). The white background of the image and above it is the different color spots; It is not transparent, with the desired result spots, there is almost transparent torus. Both the front and rear side spots should appear. Rendering will be offline, so I do not need speed; I need to create an image of Torus with an image of its surface. So far my code looks like this (it's a merge of two examples): The piece is cinematographer: #Version 330 core / Interpolated value with peak shad...

Reading multiple Excel worksheets inside a single xlsx using c# -

इस सवाल का पहले से ही एक उत्तर है: 1 उत्तर सी # का उपयोग मैं सफलतापूर्वक खोल सकता हूँ एक एक्सेल दस्तावेज़ और नीचे दिए गए कोड के साथ पहले वर्कशीट में डेटा पढ़ें। हालांकि, मेरे .xlsx में एकाधिक कार्यपत्रक हैं इसलिए मैं कार्यपत्रक संग्रह के माध्यम से प्रत्येक कार्यपत्रक का नाम हार्ड कोडिंग के बजाय लूप करना चाहता हूं। बहुत धन्यवाद। स्ट्रिंग पथ = "सी: \ एक्स्ट्रैक्ट \ एक्सट्रैक्ट. एक्सएलएसएक्स"; स्ट्रिंग connStr = "प्रदाता = Microsoft.ACE.OLEDB.12.0; डेटा स्रोत =" + पथ + "; विस्तारित गुण = Excel 12.0;"; स्ट्रिंग एसक्यूएल = "SELECT * FROM [Sheet1 $]"; (OleDbDataAdapter एडाप्टर = नया OleDbDataAdapter (sql, connStr)) का उपयोग करना {DataSet ds = new DataSet (); adaptor.Fill (डी एस); डाटाटाइल डीटी = डीएसटीबल्स [0]; } मैं लगभग एक ही समस्या पर काम करने वाला हूँ मैं काफी उपयोगी में गाइड पाया। संक्षेप में, वर्कशीट नंबर को खोलने के लिए 3, Excel कार्यपुस्तिका खोलने के बाद निम्न कोड जोड़ें: var कार्यपत्रक = कार्यपुस्तिका। वर्कशीट [3] क...

netbeans - How to let user specify pdf location using iText? -

I have created a program that will generate a report allowing the user to save that report in a PDF file format. I want to know how to specify the location of the user to save that file. I am using iText on Netbeans. Thanks :)

php - Error creating children relationship in Laravel 4 Eloquent ORM -

I have found a structure with 2 models like this: spreads class contenuti eloquent Has been {public event dettaglio () {return $ this-> Hone ('ContenutiDettaglio', 'contenuto_id'); }} Class ContenutiDettaglio Expands the legendary {public celebration contenuto ()) {Return $ this- & gt; BelongTo ('Contenuti', 'contenuto_id', 'Id'); }} When I am creating a containant, I am trying to extend the content of the container on the content element to always add content. I have written my expanse like this: Public Fixed Work findOrNew ($ id, $ coloumns = array ()) {$ obj = parent :: findOrNew $ Id); If (! Isset ($ obj-> Ditaglio (- -> ID)) {$ obj- & gt; Save (); $ Dettaglio = ContenutiDettaglio :: Creating (array ('titolo' => 'Nuovo contenuto')); $ Dettaglio-> Contenuto () - & gt; Associate ($ obj); $ Obj = Contenuti :: findOrFail ($ obj-> ID); Dd ($ obj-> dettaglio ()); } Return $ obj; } T...

android - Exported Text File Invisible? -

"itemprop =" text "> I have an Android app where I'm writing data (CSV format) for file system for export. The app writes to the file without any problem (can I see it in the File Manager app)? Issue when I plug my device into my PC, the file does not appear I am writing to the download directory using this code to get the file path: Public file getDataStorageDir () {// Get the directory for the user's public image directory. File Basis = Environment GetensteinServiceJobac Directory (Environmental. DIRECTORY_DOWNLOADS); Base = new file (base, "F3F"); Base.mkdirs (); File file = new file (base.getAbsolutePath () + String.format ("/% s.txt", mRace.name)); Return file; } I can export the file to Dropbox or email it, but I also want to be able to plug in through USB and drag it off the files system Are there. Can there be anything like this with permission? Thanks

Perl DBI/Mysql Unicode Bug -

I'm not sure whether this is a bug or I'm doing something wrong: I've read the data Copy open my $ FH, "& lt ;: encoding (ISO-Latin1)", $ file or dead "$ file failed to open: $!"; The $ file is definitely in the ISO latin1. So I check the mysql table engine = InnoDB AUTO_INCREMENT is = 53072 default charset = latin1 I connection settings : $ dbh- & gt; ("Show variables"); What does character_set_client, latin1 character_set_connection, latin1 character_set_database, latin1 character_set_filesystem, binary character_set_results, latin1 character_set_server, latin1 character_set_system, UTF8 The data iso-latin 1 (now the pearl must be internal letter format) / li> Connection information is correct settings STDOUT (output terminal Iso- is Latinl) straight but the data in the table is plain UTF8 (possibly internal format in the case of Pearl). Do I miss something this is probably a bug in DBI / ...

Save data of a Label in swift -

I have a TextField in my settingsController that I can modify a selection from a pickerView, the problem is this: When I change the text of my textfield I also change the text of a label in another controller, it works, but when I close my app and open the label again, there is no way to save text. Which I can find it pickerView My code settingsController viewDidLoad function overrides () {super.viewDidLoad () var defaults: NSUserDefaults = NSUserDefaults.standardUserDefaults () to that firstNameIsNotNill = defaults. ObjectForKey ("FirstName") as? String {self.currencyLabel.text = defaults.objectForKey ( "as firstName") string} currencyLabel.delegate = self} currencyDoneClicked function (this: UIBarButtonItem) {var myRow = picker.selectedRowInComponent (0) currencyLabel.text = pickerData. objectAtIndex (myRow) NSString DataManager.sharedInstance.contenitore = currencyLabel.text God as defaults: NSUserDefaults = NSUserDefaults.standardUserDefaults () default...

asp.net mvc model didn't receive on form submit -

Image
I have written an asp.net mvc site that works fine on the local. But after publishing it, I have some problems with the model sent from the form. I think that it determines that my model state is not always valid. I could not find any data! [HTPGet] Public Action Result Login () {Return View (); } [Http post] Public Action Result Log In (model.loginview model data) {if (! ModelState. ISI Walid) {return login (); } Teppelinties DB = new Templight (); UserAccount probableUser = db.UserAccounts.FirstOrDefault (p = & gt; p.UserName == Data Username & amp; p.Pass == Data.pass); If (the potential user == blank) {ModelState.AddModelError (string.Empty, "the name of the weak Abbas Afbarby وارد شده است!"); Return login (); } Session ["login"] = true; Session ["user name"] = potential user Username; Session ["course"] = potential user Course New Name; Session ["teacher name"] = potential user. Teacher name; Session ["real name...

php - Laravel Soft Delete Unique column name -

Suppose I have a table of the class and I have used soft deletion on it. Now for the first time I have added a category "test", after which I have removed this category so that it can update my deleted_at column from the database. Now that I am trying again, add the category by the name "Test", it is saying that this name has been taken. I have tried those rules that have been posted. But it is not working. I have used the feature in my model below, my model code is below. & lt ;? Php namespace app \ model; Brighten \ Support \ Facades \ Validator as Validator; Use enlightened \ database \ Eloquent \ SoftDeletingTrait; Class category is expanded \ Eloquent {use soft datingset; Protected $ dates = ['deleted_at']; / ** * Protected fields that are full of mass * * @ Sir array * / protected $ protected = array ('id'); / ** * Name of the table used * * @world string * / protected $ table = 'travelcake'; / ** * Validate input * * @...

javascript - Quering in a array/list in CouchDB -

I do not know how to implement the following question in Cochindi: between two objects / diets is not same in code> chr and X , and in the document boundary 200000 - 2000000, but I think it has to be done with startkey and endkey to see it. "B01", "name": "A", "pos": 828288, "s_type": 1} "" _ "": "7" , "Sub_name" "sub-name": "b101", "name": "a", "paus": 171878, "s_type": 3} the boundary range is not complete Document "10" is not valid, "A", "name": "A", "status": 871 9 63, "s_type": 3} Is because chr.letter = X. and document 14 in chr.no = 6 is not valid, since chr.no = 5 and chr.no = 6 both have the same crossover .letter = G The following documents are in the database: {"_id": "10", "_rev": "301288068d2c4ef3e6a...

javascript - using the time as a dynamic variable to compare values -

I am working on a paging programming in JS which captures calendar data from an external source, it has a multi-dimensional array In import and use it is currently working with your photo, phone number etc., to display. I have set it up so that the page reloads every 15 minutes. I want to do all this in a dynamic way so that when the clock starts at 5 o'clock, the page knows to update without wait until it refreshes for 15 minutes. All work expired in 24 hours format from other calendars (that is 5:00 1700). Here's how I am currently making the current time to compare with the beginning / end of the calendar: // Current date and time received Date dateTime = new date (); Var month = dateTime.getMonth () + 1; Var day = dateTime.getDate (); Var dayOfWeek = dateTime.getDay (); Var year = datetime.gatevair () + 1900; // Strings to change the hours and minutes as the time of 24 hours; date = datetime.gethors (). ToString (); If (hours.labhi === 1) {var hour = '0...

jquery - My $.getJson method is calling another action in my add cart functionality project? -

मेरा दृश्य पृष्ठ कोड है & lt; form method = "post" & gt; & Lt; इनपुट आईडी = "जमा 1" प्रकार = "सबमिट करें" मान = "हटाओलकार्ट्स" / & gt; & Lt; / प्रपत्र & gt; & Lt; इनपुट प्रकार = "सबमिट करें" वर्ग = "उत्पाद_बीटीएन" मान = "अभी खरीदें" / & gt; & Lt; स्क्रिप्ट प्रकार = "टेक्स्ट / जावास्क्रिप्ट" & gt; क्लिक करें (फ़ंक्शन () {$ .getJSON ('@ Url.Action ("EmptyCart", "home")', चेतावनी ('jhfg'), फ़ंक्शन (डेटा) {यदि (डेटा = "123") {चेतावनी ('गाड़ी खाली है');}})}); नाम ("विवरण")] सार्वजनिक एक्शनरशिप BuyNow (इंट आईडी) {वापसी रीडायरेक्ट करेंअक्शन ("विवरण", "होम"); } सार्वजनिक कार्यप्रदर्शन रिक्तकार्ट () {System.Web.HttpContext.Current.Application.RemoveAll (); यदि (System.Web.HttpContext.Current.Application ["cartList"]! = नल) {} वापसी रीडायरेक्ट टाईएक्शन ("इंडेक्स"...

objective c - Property of a property not being set? -

मेरे पास OJTest.h है जिसमें: @property (nonatomic) int testVal; ViewController.h में: #import "OJTest.h" @ प्रॉपर्टी (मजबूत, गैर-नॉटमिक) ओजेस्ट * testObject; ViewController.m में: - (शून्य) दृश्यडिडलोड {[सुपर व्यूडिडलोड]; Self.testObject.testVal = 100; NSLog (@ "% i", self.testObject.testVal); } फिर भी कंसोल प्रिंट 0. मैं क्या याद आ रही है / गलतफहमी? आपका testObject नहीं बनाया जा रहा है अपने दृश्य में निम्न प्रयास करें DidLoad: self.testObject = [[OJTest alloc] init]; Self.testObject.testVal = 100;

java - Activity Class Downcasting -

I can have 2 different activities that can "parse" the same piece. Inside the piece I need to save a reference to the container activity. MyActivity1 extends FragmentActivity MyActivity2 extends FragmentActivity The reference is stored within one piece square area. I can not be normal: personal activity activity; And then: activity = getActivity (); This way I can not use the methods applicable to custom MyActivity1 / MyActivity2, Downcasting does not appear to help as well: If (getActivity () MyActivity1 instanceof) {activity = (MyActivity1) getActivity (); Activity.mMethod1 (); // NOPE} and {activity = (MyActivity2) getActivity (); Activity.mMethod2 (); // NOPE} Should I use two fields (one per activity type) and leave one blank? Is there any Java smart way to do this? Hope that my question is clear. "itemprop =" text "> This does not help because you are not telling specific types of castings for specific if getActivity...

ios - Hide label when UITableView Cell is tapped -

I have a label within my cells that I want to show / hide when tapped. I know that I have to get the indicative path of the cell that was done from within the didSelectRowAtIndexPath . But how do I show that I am unsure about the label in particular that the label is hidden? I show / am able to didSelectRowAtIndexPath within a way to hide it, or there are cellForRowAtIndexPath to deal with it and then Update it? I did some research in this, but I did not really get a whole lot. Here's all I have so far: var selectedRowIndex: NSIndexPath = NSIndexPath (forRow: -1, insection: 0) override function tableView (tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {selectedRowIndex = indexPath} cell index path as follows to get to: to cell = MyCustomCell as tableView.cellForRowAtIndexPath (indexPath) cell.myTextLabel.hidden = true in addition, Depending on your needs, you may want to opt out of cell as you are The well. TableView. Discov...

asp.net mvc - Validating Enum Values within C# MVC. Partial validation occurs - How to change validation behaviour? -

I am representing an enum in my razor view as a hidden area, that is, on an action result Is posted back. / P> I've found that when it adds the string value provided within HTML, it automatically validates the value of the enum. /// & lt; Summary & gt; /// Quiz Type Enum /// & lt; / Summary & gt; Public Anonymous Quiz Type {/// & lt; Summary & gt; /// Scored Quiz /// & lt; / Summary & gt; Score = 0, /// & lt; Summary & gt; /// Personality Type Quiz /// & lt; / Summary & gt; Personality = 1} RAZR: @ html.HiddenFor (x => x.QuizType) Rated HTML: & lt; Input data-val = "true" data-val-required = "QuizType is not valid" id = "QuizType" name = "QuizType" type = "hidden" value = "scanned" & gt; If I change the value within the DOM to do something wrong and submit the form, then ModelState.IsValid returns false and the following error is added...

Convert VBScript VT_ARRAY|VT_U1 Variant function parameter to JavaScript -

I'm trying to change the JavaScript VBScript the following functions: Object .UtilBlobToVariant (Virant * PV, elongated blob pointer, elongated blob sees) where is defined PV : is part of a Variant is back type (VT_ARRAY | VT_U1) UtilBlobToVariant function to a third party COM library, so I can not change its definition . two long parameters work fine in my JavaScript version of this function, but parameter pV gives me a "Type Mismatch" error message because pV always comes back as object is an ActiveX object, so my goal is internet Explorer strictly because of this and other COM dependencies have I just var Have tried, or it's a blank Rni [] or an empty object {} , but none of them did not work whether it is even possible? Try this way For example it may be your javascript Code function UtilBlobToVariant (BlobPointer, BlobSize) {// Your code here at the end: Return PV; }

html - How to make the images not move other than the mouseovered one -

Images are displayed inline and displayed in a list, how do you make images in addition to the mouse button? When I put a mouse over an image, the images of the sides are also the move. How can I not move them? (I set the CSS settings for the image that img {width: 42px; height: 60px;} img: hover {width: 62px; height: 80px; So when it changes the shape of the mouse, its size changes.) Can you just do that? img: Hover {-viiket-transform: scale (1.30); -moz-transform: scale (1.30); -o-conversion: scale (1.30); Conversion: scale (1.30); -WebKit-Infection: all 0.5 s; -Mozy infection: all 0.5 s; -O-Infection: All 0.5 S; Infection: all 0.5 s; Z-index: 2; }

javascript - Hide select options depending on value of another select -

There are a few similar questions, but none of them fit me. The method of filtering options on the selection based on the value selected in one of the other selections I select Firstly, select one of the options with ordinary numerical value 1,2,3 ... second , Which should be filtered, includes options for 'groups' in the hundreds of options, ie, 102, 103, 202, 254 ... If Option 1 option starts with only 1 Options to be priced are being chosen You should see it in the second selection. And every time the user selects one option. I have tried this piece of code, but it does not work. Function Filters Institution (AMM) {Var currRow = elem.closest ("tr") var inType = elem.val (); CurrRow.find ("COMPName Options"). Toggle (wrong); (".comName Options"). Each (function () {$ ("[value ^ =" + inType + "]", $ (this)) toggle (true);}); } Here there are only a few options, but in reality, 80+ options are available in the se...

android - Making a checklist in Google Glass App -

I am developing an application for Google Glass. Part of the application is to make a check list in it. In this part I have a regular text, icon and a title card. My main question is now: Is it possible to add checkboxes to these cards? If so: How can I add it? Because it's running Android, you can always add it to the checkbox that you can use on a normal Android application To add an item handler, click Add to Android: OnClick attribute for the element in your XML layout, for example: Click here for a checkbox to define event handlers. The value for this attribute should be the name of the method that you want to call in response to a click event. The same method should be applied if hosting the activity layout For example, there are items in a couple of checkboxes list here:.? & lt; XML version = "1.0" encoding = "UTF-8"? & Gt; & Lt; LinearLayout xmlns: android = "Http://schemaskandroidkcom/apk/res/android" android: ...

application name - Elmah applicationName="myApplication" isn't working -

I have received many posts about this issue, although I have not received any resolution or even the signal Not even that the "ApplicaitonName" attribute function still shows the application column as the blank value. I tried to do it with many projects and new projects and I got the same results. Elma logs everything correctly, but never by any name. Any thoughts? & lt; Elmah & gt; & Lt; Security permissionsmax = "incorrect" /> & Lt; ErrorLog type = "Elmah.SqlErrorLog, Elmah" connection StringName = "MyConnectionString" applicationName = "MyApplication" /> I just created a new database in SQL Server Express Yes, Elmaha was run. The SQLServer.sql build script, created a new web project, installed the NuGet package: ELMAH and elmah.sqlserver. The Web In Configure, ELMAH configuration looks like this: & lt; ErrorLog type = "Elmah.SqlErrorLog, Elmah" connectionStringName = "elm...

sql - MySQL - Very simple Join is taking too long -

This is my first question in the StakeVarf Flow and I'm happy to be part of this community because this has helped me many times . / P> I am not an expert in SQL and MySQL, but I am working in a project which requires large tables (million lines). I have a problem in getting involved and I do not understand why it takes so long thanks in advance :) Here are the tables: table Create (id int unique, codigo_alta is four (1), nombre varchar (100) present tabla_maestra, empresa_apellido1 varchar (150), apellido2 varchar (50), tipo_via varchar (20), nombre_via varchar (100 ), numero_via varchar (50), codigo_via four (5), codigo_postal four (5), nombre_poblacion varchar (100), codigo_ine four (11), nombre_provincia varchar (50), Telefono varchar (250) unique, Actividad varchar (100) , Estado four (1), codigo_operadora four (3)); Create table if Tablet_activated_press does not exist (Empress_appellido 1 varchar (150), activation varchar (100)); The query is what I want to...

Cannot understand Behaviour of Static In C and C++ -

#include & lt; stdio.h & gt; Int main () {goto lb; स्थिर इंट ए = 5; एलबी: गोटो बी; Int b = 6; बी: प्रिंटफ़ ("% d% d", ए, बी); वापसी 0; } जब मैं ".c" फ़ाइल एक्सटेंशन से यह कोड सहेजता हूं, तो यह अच्छी तरह से काम करता है और 5 "आउटपुट" को "कचरा" मान के बाद देता है। लेकिन , सी ++ में, यह एक त्रुटि में परिणाम है मैं समझ नहीं सकता कि एक त्रुटि क्यों है क्या आप मुझे बता सकते हैं कि इसे कैसे सुलझाया जाए? इसका कुछ भी स्टेटिक्स के साथ कुछ भी नहीं करना है : Main.cpp: फ़ंक्शन 'int main ()': main.cpp: 12: 1: त्रुटि: लेबल 'बी' के लिए कूद [-fpermissive] b: ^ main.cpp: 9: 10: त्रुटि: यहां से [- Fpermissive] गोटो बी; ^ Main.cpp: 10: 9: त्रुटि: 'int b' int b = 6 के प्रारंभ को पार करता है; ^ सी ++ के नियमों के विरुद्ध गोटो - प्रारंभिक रूपों में कूदते हैं; यह कक्षाओं और ऑब्जेक्ट्स के लिए अपने समर्थन के साथ हाथ में जाता है, सामान्य तौर पर, सी में बनायी जाने वाली वस्तुओं की तुलना में अधिक जटिल। आपको पढ़ना ...

Using c# System.DirectoryServices to retrieve Group Notes -

I need to create a process to retrieve the AD Group Notes field I have looked up those questions and they do not answer my question I just need to read the data and search on group names, but then Is able to use the notes to work forward. var context = new principal context (context type.dmen, "???", "???", "???"); Var insGroupPrincipal = New groupPriniport (reference) {name = "-Poponpan - * - Global"}; Var insPrincipalSearcher = new principal {QueryFilter = insGroupPrincipal}; Var Results = insPrincipalSearcher.FindAll (); Leading (various results in P) {Console.WriteLine (P); }

How can I find the current apps name from python on heroku? -

How can I currently get Ajax's name from Ajax? I want to know because I am using myself to start and allocate my lock button automatically. Can it be a part of any part of an OS? Through Haraoke support: Finding the Name of the App Possible, sorry. You can potentially do that the same thing is coming from hostname requests and analyzing the app's name detection with it.

Ruby: Don't raise error on date.strftime() if date is nil -

One such case is when the code is called on zero I disagree. This is the Datetime.strftime method. Indeed, this is considered to be formatted in the string in the date time object. Then it must be understood that datetime = Time.now Datetime.strftime ('% d-% m-% Y') # = & gt; '17 -10-2014 'datetime = zero datetime.strftime ('% d-% m-% Y ') # = & gt; Instead I need to always write: datetime.strftime ('% d-% m-% Y') If the date time > Which is a pain. I think many unexpected behavioral series should come in the middle after calling a method on the blue, but in that situation, I do not see much danger. A string is returned anyway, and the result is quite logical: (empty_date) .to_s => empty_string Can I avoid this behavior? I disagree with you. A zero value, which is a method called on it, which is kept in helpless codes, flow, or a situation which has not been adequately validated. I do not know why your s...

When does objectify verify existing data in a related entity? -

I am writing this with my head now, tell me wrong if I am wrong but I remember the following code verification It is done that if the unit behind the reef-object is & gt; Actually exists: Ref & lt; User & gt; the user; // We have a reference field for any other entity, public zero reference user (long user ID) {key What if the ref & lt;> area is already set during an update? Is it true that it is not verified again if the record still exists? I clarify that when the object ensures data integrity and when it is not referenced whether a referenced record exists or not. The objective does not ensure the relevance of any type of integrity nor low-level API. The referee objects are just some objects, which are slightly more behavior (most importantly found) (method) (method).

excel vba file filtering to "original filename" -

I am working on a code in Excel VBA, where the user can choose the default route for a file, if he does not Its default path is I want to filter it, to make sure that it will not select the wrong file. My idea is to somehow check that "original file name" (which you can see in properties -> details) is like me. This way it will work even when specific file Name should be changed My problem is, I do not know how to reference it. Edit Thanks for the ZAT, the actual code looks like this: Private sub vncexe (as vhensxe string) string retarded vncpath2 as vncpath1 dim string Static temppath string vncpath1 = "as in the C: \ Program Files \ RealVNC \ VNC Viewer \ vncviewer.exe" vncpath2 = "C: \ Program Files \ RealVNC \ VNC4 \ vncviewer.exe" dim Opt for String Ob as Opt, then opt = "OB1" then enter (vncpath1) & lt; & Gt; "" Vncexe = vncpath1 ElseIf Dir (vncpath2) & lt; & Gt; "" Then vncexe = vncpa...

regex - Regular expression for password validation in c# -

For password recognition, in C # in Need help with rezux; At least one digit, lower case and one upper case I'm tired: var rule = new Regex ("^ (? =. [Az]) (? =. * [AG]) (? =. * [0- 9]) $"); but it does not work: ( before you Letterhead and you also need to add . * to add zero after all the LookIahad, because it claims zero width, it will not match any character, but only it tells Whether a match is possible or not. var Rules = New Reggae (@ "^ (? =. {8,16} $) (? =? *? [Az]) (? =. *? [AZ]) (? =. *? [0- 9]). * $ ");

c - return a pointer struct from a function -

I 'switch' the user input of that row and column (this is called a game teaser), but I'm not sure That is how I return the value I want back to. The warning I received is: WARNING: Indicator for the incompatible integer conversion 'slipping' * from the result type 'int' [-vng-conversion] typedef struct {int row; Int column; } Trick; / * Function: getNextMove * Description: Ask the user for a new trick or if the user * wants to leave * the game. * Input: An indicator for a move structure. The coordinates for the next step * or a hint from the user to end the game * Output: Return 0 if users want to end the game, otherwise 1. * Return coordinates to the next game through the structure * indicate the structure * / Int getNextMove (go ahead next) {printf ("Create a move (line = 0 game ends) \ n"); Printf ("line ="); Scanf ("% d", and next->;); If (uplammer->; == 0) {return 0; } Printf ("column ="); Sca...

SQL Server: Replace characters different than a char in a string using no temporary table -

I have the NVARCHAR (10) column in a table. It can store any type of Unicode Wire. I want to change every four which is different in comparison with '1' '0'. Let's say I do string '012345C18 *' I should get '0100000100'. I managed to use it in a support table, which is indexed in size from 1 to my column (10), like: Table Help (IDX INT ) Select test support Select 1 Select Unions 2 Select Unions 3 Select Unions 4 Select Unions 5 Select Unions 6 Unions Selection 7 Federal Selection 8 Unions Selection 9 Unions Selection 10 Announced @myStr VARCHAR (10) Set Insert @myStr = '012345C18 *' Select STUFF ((Select '' + Case (B.Ch) when 'From 1 'then' 1 'remaining' 0 '(SUBSTRING (select A.Val, H.Idx, 1) as Chowdhury' 1,0), 'for XML path (@ Select myStr) Join a Cross Help H) B ('') This works, but can this be a good way? It looks ugly for a simple update, ignoring the fact that the size o...

php - Left category menu - change the rendering of just one menu item -

कोड & lt; div class = "box" & gt; & Lt;? Php foreach ($ श्रेणी के रूप में श्रेणियां) {? & Gt; & Lt; li & gt; & Lt;? Php if ($ श्रेणी ['category_id'] == $ category_id) {? & Gt; & Lt; a href = "& lt;? Php echo $ category ['href]];? & Gt;" वर्ग = "सक्रिय" & gt; & lt;? Php प्रतिध्वनि $ श्रेणी ['नाम']; ? & Gt; & lt; / a & gt; & Lt;? Php} और {? & Gt; & Lt; a href = "& lt;? Php echo $ category ['href]];? & Gt;" & gt; & lt;? Php प्रतिध्वनि $ श्रेणी [' नाम ']; ? & Gt; & lt; / a & gt; & Lt;? Php}? & Gt; & Lt;? Php if ($ श्रेणी ['बच्चों']) {? & Gt; मुझे एक ठोस मेनू आइटम प्रदान करने के तरीके को बदलने की जरूरत है, आइडी 73 के साथ श्रेणी के लिए कहते हैं। मैं इसे ऊपर के टेम्पलेट में कैसे कर सकता हूं?

mysql - Get similar entities in Symfony using Doctrine -

I have a unit in the symphony for the video saying that DB looks like this: id: full name: varchar uploader: int (user unit) video_mp4: varchar param1: int param2: int param3: int I want to load similar videos. or similar parama or similar Parama 3 Actually I get the most matching (which means that the same user uploaded The video should be more important with the same parameter 1 + Ultimate 3 then there is only one where there is only 2 matching) order by most matches Dexc How to get any ideas I have to use this question for this ( Yes I know that is not good for "db" or "sugestions are welcome;)) I created a function in my entity class that looks like this: ($ q is a quierbilder) Public functions are found ($ q, $ limit = 6) {$ Uploader = $ this- & gt; GetUploader () - & gt; GetId (); $ Param 1 = $ this- & gt; GetParam1 (); $ Param 2 = $ this- & gt; GetParam2 (); $ Param 3 = $ this- & gt; GetParam3 (); $ Q- & gt; ('My...

c++ - How to implement user friendly accessors -

मैं बस कोड पोस्ट करूंगा: #include & lt; tuple & gt; नामस्थान प्राथमिक_प्रोचोल {नामस्थान {typedef uint64_t फ़ील्ड_id_t; Typedef uint64_t field_size_t; Typedef uint64_t msg_id_t; Typedef uint64_t msg_size_t; } Struct field_header {field_id_t _id; Field_size_t _size; }; स्थैतिक const आकार_t field_header_sz = sizeof (field_header); टेम्पलेट & lt; वर्ग TFieldType, field_id_t id & gt; संरचना क्षेत्र {निजी: सार्वजनिक: फ़ील्ड_id_t _id = id; Field_size_t _size = sizeof (* यह); TFieldType _value; }; Struct message_header {msg_id_t _id; Msg_size_t _size; }; स्थैतिक const size_t msg_header_sz = sizeof (message_header); टेम्पलेट & lt; msg_id_t msg_id, वर्ग ... TFields & gt; संरचना संदेश {msg_id_t _id; Msg_size_t _size = sizeof (* यह); std :: टपल & LT; TFields ... & gt; खेत; }; } नामस्थान प्रभाव {typedef uint64_t फ़ील्ड_id_t; Typedef uint64_t msg_id_t; स्थैतिक const size_t field_name_sz = 256; स्थैतिक const size_t msg_name_sz = 256; टाइपिंग प्राइमरी_प्रोटोकल ::...

Dynamically generated input fields are not affected by .click and .blur jquery css changes -

I have an HTML form that generates another field when I click on a button. The problem is that the dynamically-generated input field is not styled. Here is my HTML form: & lt; Form id = "form" & gt; & Lt; Input type = "text" id = "enter" /> & Lt; Br> & Lt; / Form & gt; & Lt; Button ID = "add_field" class = "button" "& gt; add button & lt; / button & gt; My jQuery which generates a new field (This works ): And here is the code that is clicked by: When changing, the style of all text fields should be changed: $ ('input: text'). (Function () {$ (this) .css ('background-color', ' Css ('border', '1px solid # 0085f0');}); $ ('input: text') css ('border', '1 px solid black');}); P> This works for all areas which I It was entered in the HTML code, not the fields dynamically generated. Use .on to targ...

Django Tastypie nested resources, models are linked via Foreignkey -

I am trying to apply nested resources in jigs using testifier. Till now, I have only managed each resource separately, for example / API / car / will show all car brands and details. What I am trying to achieve is to get examples / APIs / properties and fields of all features, linked to drivers, and connected to cars. The API is: Class Carrier Resource (Model Resource): Class Meta: queryset = Car.objects.all () resource_name = 'car' category driver resource (Model RSORS): class meta: queryset = Driver.objects.all () resource_name = 'drivers' filtering = {"id": all, "info": all,} class attributes resource (model resource): class meta: queryset = Attribute.objects.all () resource_name = 'attributes' filtering = {"genre": ALL, "value": ALL, "Time_start": ALL,} and in models.py The following features are declared and foreign keys: class car (mo Dels.Model): Brand = Model Kharefild (Max_Lang = 40) Des...

c++ - CocosDenshion::SimpleAudioEngine pauses all actions when playing an effect -

After I have applied the audio to my project, when start (form) my class in Function with this code: CocosDenshion :: SimpleAudioEngine :: sharedEngine () - & gt; GetInstance () - & gt; PreloadEffect ("fx / frog.wav"); and the Sprite class is playing the effect with this code when: CocosDenshion :: SimpleAudioEngine :: sharedEngine () - & gt; GetInstance () - & gt; PlayEffect ("fx / frog.wav"); Background scrolling stops and other Phantom sound effects continue until I finish, I am working with Cocos2d-X 3.3 beta, and targeted the WIN32 project Debug output needs your help if necessary. OpenGL OpenOffice 0x0500 in Ready for GLSL Ready for . \ Base \ CCConfiguration.cpp Cocos2d :: Configuration :: gatherGPUInfo 142 {gl.version: 3.2.9756 Compatibility Profile Context Gl.supports_NOT: True cocos2d.x.version: Cocos2d-x 3.3beta0 Cocos2d .x.compiled_with_profiler: Incorrect cocos2d.x.build_type: DEBUG cocos2d.x.compiled_with_gl_state...

mysql - How to find duplicate records in ActiveRecord other than original one -

using Rail 4, Ruby 2, MyScall I would like to find all the records in my database which are Repeats the record - but not the original record. That's because I can do update_attributes (: duplicate = & gt; true) ) on each of these records and can not be marked as the original duplicate. You can say that I am looking at the opposite of Uniq I do not want a universal value, I want all the values ​​that are not unique after the fact. I do not want all prices to be duplicate, because it will include the original. I do not like to use pure SQL or Ruby for this but I like to use an active record to keep it on track. Suppose that the table is called "lead" and we are looking for people where the area "telephone_number" is similar, I will leave record 1 alone and duplicate = true to 2,3 and 4 I can mark as * If I want to contrast the Unicode then b = a.group_by {| H | H [: telephone_number]} .values.select {| A | | A.size & gt; 1}. Flaton ...

asp.net mvc - MVC 5 / Bootstrap App - Modal Dialog Auto expand? -

I found the following HTML in an MVC 5 / Bootstrap app as you can see, I display a photo in the modal dialog I am trying to do It works fine but, if the picture is more comprehensive than the dialogue, then it extends beyond the boundaries of the dialogue is there any way that I can increase the dialogue at a certain point, then on the basis of the size of the content Can I display scroll bars? & lt; Div class = "modal fade" id = "visible photo dialog" tabindex = "- 1" & gt; & Lt; Div class = "modal-dialog" & gt; & Lt; Div class = "modal-content" & gt; & Lt; Div class = "modal-header" & gt; & Lt; H4 & gt; Ask Experts & lt; / H4 & gt; & Lt; / Div & gt; & Lt; Div class = "modal-body" & gt; & Lt; Img src = "@ Url.Action (" GetPhoto ", new {askTheExpertId = @model AsktheExpertId})" alt = "" title = "" /> ...

vxworks 6.9 pcpentium pcpentium4 bootloader build error -

After I am trying to make a bootloader / bootrom using the pcpentium / pcpentium4 with BSP VxWorks 6.9. I have a boot loader in the workspace to build the pcpentium / pcpentium4 an uncompressed ELF using BSPs image with a GNU compiler which I can use to establish a common Intel processor-based PCs Started by creating the project. When I try to make it, I am complaining to complain about the error VX_COPROCS_ALL_TASK below, although I do not know where it is defined. ?, from 193C: Does anyone else have this problem and how you solved it The file contains from C: /WindRiver/vxworks-6.9/target/src/config/ usrWdb.c: /WindRiver/vxworks-6.9/target/src/config/usrExtra.c: 630, C: /WindRiver/vxworks-6.9/target/config/all/usrConfig.c: 612: C: / WindRiver / vxworks-6.9 /target/config/comps/src/usrWdbSys.c: 'wdbSp' function: C: /WindRiver/vxworks-6.9/target/config/comps/src/usrWdbSys.c: 116: error: ' VX_COPROCS_ALL_TASK 'undeclared (first use in this function) WI...

java - how to stop the timer -

I am using Netbeans 8.0, and it is difficult to stop timer in my GUI. This is my code. Public class Task1 implements Runnable {public void run () {long start = System.currentTimeMillis (); While (Thread.interrupted ()) {long time = System.currentTimeMillis () - start up; Last long seconds = time / 1000; Last long minutes = seconds / 60; Last remaining balance = seconds = seconds% 60; Last long hour = minutes / 60; SwingUtilities.invokeLater (New Runnabal) (Public Zero Run) {jLabel3.setText ("Time has passed:" + + + ":" + min + ":" + SEC SEC;)}}}); Try {Thread.sleep (100); } Hold (exception e) {}}}} thread t 1 = new thread (new function 1 ()); Private Zero jButton1ActionPerformed (java.awt.event.ActionEvent evt) {t1.start (); } Private Zero jButton2ActionPerformed (java.awt.event.ActionEvent evt) {t1.interrupt (); // it does not close my timer} I made two buttons that starts the jButton1 timer and prevents jButton2 timer. Please advise.

java - Using different packages for Controllers when using Spring -

If I create a standard spring project in Spring Toolkit, then it works great! I go to the local host: 8080 / greeting and get my Hello world feedback. If I copy those 2 files into another source in my source tree and then go to the local host: 8080 / I receive an email: Whitelabel Error page There is no clear mapping for this application / error, so you are seeing it as a fallback. Fri 17 October 18:15:45 BST 2014 was an unexpected error (type = not found, position = 404). Transferring 3 sections in the same basic package solves the problem but from the point of view of a source tree organization it is not what I have to do. Some may be due to automatic configuration, please someone can tell me what to do to give my project support in the form of controllers and objects as many packages. If your code appears in the tutorial, then servlet-reference.xx Open and & lt; Reference: component-scan support package = "..." /> You can list multiple ...

javascript - event listener on an HTML element -

I am writing a web application that loads different page elements via AJAX call. I want to be able to trigger an load event when a certain element loads from an AJAX call, but I have all the elements DIV and are unable to trigger such incidents. Is there anything I can do? Can I add HTML files to trigger? If you are using jQuery, you ready () event ( You can hear scripts on page (or loaded elements) after full loading (or loaded elements) on the page: Your load page: $ (Document) .ready (function () {// When the page (or loaded element) is fully loaded for action}}; This can help you better: $ ("button"). Click (function () {$ .ajax ({url: "file_to_load Html", success: work (result, status, xhr) {warning ("Ajax request:" + xhr.status + "" + xhr.statusText); $ ("# Container"). Html (results);}});}); Success parameter executes a function when the request is successful. The maximum parameter result contains t...

RTAI on a debian distro - Unsure why this C thread code (implements a simple counter) would cause linux to crash -

The I have a log file via printk This is the code that implements a simple counter and zero thread_code (function to write this void * is applied by args), and then it __init rtcode_init (zero) in the thread real time. This question is an examination question. I'm sure why the code will cause Linux to crash. Is it due to steady work, because it can cause a race condition if you can reach the function arriving memory address multiple threads? It would be better to have someone say what is wrong with the code. #define ARG 0 #define STACK_SIZE 1024 #define preference RT_SCHED_HIGHEST_PRIORITY #define USE_FPU 1 #define now rt_get_time () #define period nano2count (1000000) / * store data for thread * / RT_TASK Required thread_data; Zero Threadcode (Zero * arg) {int counter = 0; While (1) {counter + = 1; Printer ("counter =% d \ n", counter); } Return 0; } Fixed integer __init rtcode_init (zero) {rt_set_periodic_mode (); Start_rt_timer (period); rt_task_init (& am...

c# - Toast Slide with Easing -

I have a "Toast" WPF window that slides from the bottom right corner of the screen - how can I easily add The layer that returns to the slide is var anim = new double animation {duration = timepan From milliseconds (280), from = left, to = left-- (width * 2),}; This.BeginAnimation (Window.LeftProperty, Anem); var anime = new double animation {duration = timespan From milliseconds (280), = to the left, = left-- (width * 2), ease = new bounce is ()};

VBA Exporting Chart Arrays on Button Click -

sub onButtonClick () goal in as dim source worksheet, worksheet set source = Carypustkon ( "End Market Monitor. Xlsm "). Worksheets ( "Arrow graph") set in as dim Taitl_nam string as target = Sheet1 dim Vrksshit, Search As String search = ActiveCell.Offset (0, -5). Value Redem ChartArere (1 source. ChartObjects.Count) for chart as I = 1 source. Chart object Title Title_name = source.ChartObjects (i) .chart.ChartTitle.Text counter = 1 if InStr (title_name, search)> 0 Set the chart chart (counter) = source.ChartObjects (i). Close Counter = Counter + 1 Termination if Next Set wsTemp = Sheets For n = 1 with WsTemp for n = 1 (Chartarray) chartArray (n). Copy Image WsTemp.Range ("A1"). Paste Special Selection Empty = TP selection. Lift = 5 TP = TP + Selection. White + 50 wsTemp.ExportAsFixedFormat type with the next expiration = XlTypePDF, filename = NewFileName, quality = XlQualityStandard, _IncludeDocProperties = true ignore Krenprintares: = False, Ope...

Setting instance variables in Ruby -

In Ruby, how do I specify a string on a frequency variable, so that it is available for other methods in a class? @variable = "your string" As simple as it is

layout - Website Sitemap Drawing App or Tool -

Image
Once I used 1 device to attract website sitemaps, I forgot the name of it and now find it I can not find It's easy to use and fast. I have only a picture of 1 image, so you can know me its name. I googled for a long time and nothing. It works that you make a point of 1 point and other point and type name and you keep on spreading. The application is called Mentendode, you can get it here.

Functionally creating variables using string names in R -

The same argument I am trying to generate a function to create a bunch of columns on a data frame containing the same naming conventions Unfortunately, I bump into some strange behavior while creating the variable, and I hope someone can tell what's going on. df dfBad in var1 Instead of a variable called a variable var1 and a variable named var1_squared as I had hoped. The function below All values ​​of the original variables around this value, according to the name of the new variable, then only the new variable will have the same operation , But it is unpleasant in a way, and I am not sure what will happen if I need to use logic in many variables. Works Here no guidance is highly appreciated, especially if the variable Swings between names of strings and column objects for references A good way of doing this. You are missing a comma. df Edit: Okay then the above answer works, but this is actually the question of Does not answer why the other w...

gradle - appcompat-v7:21.0.0': No resource found that matches the given name: attr 'android:actionModeShareDrawable' -

Image
When trying to use the latest app-com-V7 support library in my project, I get the following error: /Users/gregate/dev/mobile/android_project/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/21.0.0/res/values-v11/values.xml Error: (36, 21) No resource found that matches the given name: attr 'android: actionModeShareDrawable' error: (36, 21) No resource found that matches the given name: attr 'android: actionModeShareDrawable' Error: (36, 21) No resources found Matches the given name: attr 'android: actionModeShareDrawable' error: (36, 21) No resource found that matches the given name: attr 'android: actionModeShareDrawable' How do I fix it? Answer the answer in this detail exactly what I want and all of the IDE (Eclipse, IntellJ and Android Studios) Even though errors slightly differ. Give solution / H2> to make sure that you have the latest additional as well as Android 5.0 SDK prerequirements SDK Manager...