Posts

Showing posts from August, 2015

java - Converting a project to maven - dealing with additional source directories -

I am converting a legacy Java project into Maven, it currently uses the ant, and has a structure in it : src \ mainProduct \ com \ mycompany src \ external \ com \ acme \ ... Let me assume that I am taking everything under the Maven structure ( src \ main \ java ) under src \ mainProduct , there is no way in it without any extra As the source directory, go to external folder to contain? Alternatively, how do I transfer it under the src \ main \ java \ external \ / code>, without changing the package names? Take a look here: What do you have to do: & lt; Build & gt; & Lt; SourceDirectory & gt; Src / mainproduct & lt; / SourceDirectory & gt; ... & lt; / Build & gt; Alternatively, you can try and use the suggested approach here: Build-Helper-Plugin and its documents can be found here:

qt5 - How to declare list property in QML -

How do I declare a listing property in QML (with qt.labs.settings My Case): Settings {Property list Recent files: []} does not work I try several other options Is: list & lt; String & gt; , string [] , etc. Nobody starts doing work. settings {property var recentFiles: []}

struct - Keeping type definitions and some symbols in an elf file -

Starting with an ELF file that contains the required information to fully debug my application, I make an ELF I would like to have only some symbols I managed to get it done with the GNU binuntils strip tool: Strip -F elf32-big -p -s -K myFunc1-K myFunc2 -K myVar1 -K myVar2 myApp.elf My concern is that myVar1 and myVar2 are structured variables and debuggers can not scratch them because 'Patti' has been removed from Elf .debug_info section .debug_info I understand, where the definitions of the structure are stored, I understand). Ideally, what I would do for the debugger to parse my variable only in Elf I played with the options of 'strip' I played with other binutils (Rileyf, Obsokie, Ozdump ...) When I had read. But this is not anything satisfactory. How would you do this? I do not know which device you already want. If I was told to do this, then I will push back. Instead of trying to stretch some parts of the Debuginfo, I would wonder why we co...

Filtering statistics from facebook ads api using the python sdk -

To get data about ad accounts / campaigns / etc within a certain time frame, Facebook's advertising-API I am trying to use / P> So far, I managed to get the overall information (added below) using official python SDK, but I did not know how to insert time filter status. The answer is probably under "filtering outcome" here, but I do not understand what they are doing for dragon, to translate it ... I really appreciate any help you provide, Thank you! This module related to the official Python SDK project (I think): My current code is: facebookads.session import Import facebookads.api from FacebookSession from FacebookAdsApi to Facebookads facebookads.objects Import (AdUser, AdCampaign,) my_app_id = 'import_pic' my_app_secret = 'AP_SECRET' my_access_token = 'ACCESS_TOKEN' my_session = FacebookSession (my_app_id, My_app_secret, my_access_token) my_api = FacebookAdsApi (my_session) FacebookAdsApi.set_default_api (my_api) I = obje...

javascript - $state.go doesn’t redirect to given path -

Image
I have a view that is outside my tab, now when I try to redirect from that view to that tab I get what I get redirected to the wrong tab I ($ scope, $ state, $ rootsecope, $ ionicPlatform) {$ rootScope. $ ('$ StateChangeStart', function (event, toState, toParam, fromState, fromParams) {// $ scope.from = fromState; Console.log (Settte);}) $ scope.goBack = function () { Console.log ($ scope.from.name); $ State.go ($ scope.from.name);}}) You should apply other answers, but you have another problem. The other problem is that, when you click on the back button, the state changes on the tab. Volgend (which is correct), but after that the tab is going on. Alert state ... So I'm trying to explain why this second redirect is happening. Remove from console.log when click on clicki ng back button: My first candidate is: $ urlRouterProvider.otherwise ('/ tab / alerts'); You should not use UI-Route with standard routing, so you should add this line next...

angularjs - How to read an attribute of angular.element without knowing whether it has been prefixed with data- or x-data -

I was wondering if there is a standard way of attaining attribute from an angular element without knowing the name of the attribute, - Prefix with data I have seen this code inside the instructions: el.attr ('x-data-' + attr). | El.attr ('data-' + attr) || El.attr (attr) Is this the right approach, or are there some other standards? In HTML, you can add attributes to elements such as data - *. (Note: always prefix your attribute with data) - & lt; Div data-type type = "evaluation" & gt; & Lt; / Div & gt; In the JS file you can get the value of the attribute such as var val = element.data ('work type'); (Note: The prefixed part will be skipped here.) Browser: IE9 & amp; Chrome, etc. If you are not sure about the browser or are not sure what the naming convention will use for your specialty, then you el Attr ('x-data-' + attr) || El.attr ('data-' + attr) || El.attr (atri)

javascript - Join events keypress (with keyCode) and click on link -

My question is simple but I could not find any solution. I have a function: function toggle label () {$ (".ableable"). Toggle (); If ($ (this) .Parent () .Parent (). HasClass ("selected")) {$ (this). Parent (). Parent (). RemoveClass ("selected"); $ ('Preview-toggle message'). Text ('Hide Options'); } And {$ (this). Parent (). mother-father (). AddClass ("Selected"); $ ('Preview-toggle message'). Text ('show options'); }} that I would like to call with two different incidents: $ (document) .keypress (function (e) {if (e Click the keycode (= 113) {.... and $ ('preview-toggle one'). Is it possible to get involved in these events? I have tried .bind () but without any positive result: ( thanks.fabio After trying my suggestions, I decided to separate the events and choose this format. Is: var toggleLabels = function {$ (".ableable") toggle (); if ($ ($ '(preview'...

Simple ?heatmap? of temperature in R (ggplot2) -

Image
I'm trying to create a simple date * Temperature heatmap (? Raster graph)? The temperature group is something like, but only with the date axis (no time variable.) I would like to use ggplot, but Running would be misleading. Data is produced in the right direction, but I can not understand how to get rid of Y-axis for. I appreciate any help dat Div class = "post-text" itemprop = "text"> So you do not want to do temporary map on the Y axis? Ok, You can use a fixed value and skip the y-axis: dat

Android Studio build gradle as not found -

I have problem in Android Studio Error: Build File 'C: \ User \ Spotlight \ AndroidStudioProjects \ programmierpraktikumwise2014 \ Gr2-android \ For more information, you can follow the official documents of Android Studio. Best regards.

android - Two vertical Listviews having the same row height -

Two listviews (vertical parallel) I want to display in my layout is the same number of items, but the problem is that Their heights are not synchronized, so I want to make my heights equals ... & Lt; Android: layout_weight = "0.85" Android: choiceMode = "singleChoice" Android: Divider = "@Android: Color = Dark_gray "android: dividerheit =" 0.2sp "Android: fastScrollEnabled =" true "/> You can write code like this to create an equal list view: & Lt; Android: layout_weight = "250dp" Android: layout_weight = "1" Android: background = "@ android: color / white" Android: choiceMode = "ListView" Android: id = "@ + id / content" Android: layout_width = "0dp" SingleChoice "Android: Divider =" @Android: Color / darker_gray "Android: dividerHeight =" 0.2sp "Android: fastScrollEnabled =" true "/>

SQL Join / Union -

I have two statements that I want to merge into an output. Statement One: Select the name from the Oxylliri_Variable_Inquire where the check_IDbcd = '063' gives the following list of names: name ---- -------- affiliate netbook value guardian worldbase statement two: name, the value from the Assistant_value_value where the inquir_idbr_code = '063' and ru_ref = 20120000008 and duration = 20012 gives the following: The value of ----------------- - 112 NetbookEvolution 225.700 affiliate - I have to be an output like this: Value of name ----------- -------- Partner 112 Netbook value 225.700 Parents 0 WorldBus 0 So basically, if only 2 names and values ​​come in the second query, then I still would like to display fully the set of name es from the first query, If all the four values ​​come back with all the questions, then all four will be displayed. Sorry, I have to add IM using Ingres SQL so that I can not use the ISNL function. I...

c++11 - C++ Remove element from std::vector containing closures with variadic templates -

I have a class based on the code shown here: The difference is that I variadic template . It works well, but I can not remove a callback from the vector because I am not able to find it. Either I'm getting the error or I'm getting some strange value which I can not compare to finding the element. The code that will not work: for (auto i = this -> handler.bizen); i! = This-> handler.and ( ); I ++) {if ((* i). Target & lt; void (Args ...) & gt; () == f.target & lt; Zero (RGS ...) & gt; ) {It-> Handler Arrays (i); break; }} I did a lot but I was not able to do anything for this matter. For example std :: find does not work in my case. Any help is appreciated. SILBERLING EDIT: As far as I know the main problem is that the std :: function does not support == and! = Is there any way to get rid of this for the reasons? Is there no way to identify Lamdas, so should I remove it again? I mean, at least there is a place in her memory. Targ...

php - Avoid cannot pass reference error in function -

I have a function where arguments with a reference (& amp;) are argued, however, If I set it to zero, I get an error: "Parameter 1 can not be passed in context ..." This script is: & lt ;? Php function doSomething (and $ reference, $ arg1, $ arg2) {if ($ reference! == NULL) {// do something with reference} else {// do something else}} // Call with reference Something ($ A, $ b, $ c); // call without reference / something / (zero, $ B, $ C); ? & Gt; It seems to me that due to this fact it seems that the zero has not been declared as a variable, but it was immediately declared in the function. This works when I do this: $ nullVar = NULL; DoSomething ($ nullVar, $ b, $ c); How do I edit my function, so when I tap into the function, the reference will not show error, and reference only when possible (since I do not use context It is set to NULL) If you swap the position of arguments then you are still an alternative Can create references: f...

How can I use scope change event in services in angularJs -

I have a controller and a service, but now I want my controller code to be moved to the services so that it is again : Can be made usable. But the problem I am experiencing here is that my controller is using the $ scope service, which means that my code is dependent on the $ diameter event. If I move my code into service, then how can I change this $ scope event now? I do not know that this is the most effective way, but you pass the $ radius as the function parameter can do. Controller: MyService.aMethod ($ scope, other parameters); Service: this.aMethod = function (scope, other parameters) {scope.result = otherParameter * 10; }

c# - How to Integrate NodeJs in Existing .Net MVC application Using EdgeJs? -

Can someone recommend another way of integrating nodes in the net message application? I am now using the following code: Public class startup {public ASICNC works & lt; Object & gt; Invitation (Dynamic Input) {Department Rip Engineer = New Department Ripp (New MVCApusing Agesjmongo Debecontx ()); Var section = person.GetAllDepartments (); // var department = "hello"; Returning department; }} Public Class Department Controller: Controller {Department Repository Department Repository = New Department Repository (New MVCPUG EdgeJmongo DBCTXT); String connectionString = ConfigurationManager.AppSettings ["connectionString"]. ToString (); Public View Results Index () {// var clrMethod = Edge.Func ("DepartmentRep.cs"); Var getData = Edge.Func (". / DepartmentRep.dll"); // Return View (clrMethod); See Return (Department Repository. GetAllDepartments ()); }} It seems that, you may have a misunderstanding about using EdgeJs . Your sta...

django - How do I disable CSRF in Django1.7? -

It seems that @ CSRF_nation is not working any more than Jigon 1.4, I try to use those different solutions I am getting the stack overflow, like removing some middleware classes or adding a custom one, but I can not stop getting "CSRF verification failed" I just have to disable it for a login view which I Your android ai I am experimenting with P. If you are using a class based view, you can use the mixer for it : Class UpdateProfileView (CsrfExemptMixin, LoginRequiredMixin, UpdateView): Model = Profile

ASP.NET webform Fileupload inside an ascx which is inside an updatepanel in the aspx -

मेरे पृष्ठ में कुछ कोड है: & lt; asp: UpdatePanel आईडी = " UpdatePanelEQSelector "runat =" सर्वर "UpdateMode =" Conditional "& gt; & LT; ContentTemplate & gt; & Lt; uc12: EQSelector आईडी = "custEQSelector" OnEqChange = "custEQSelector_OnEqChange" runat = "server" / & gt; & Lt; / ContentTemplate & gt; & Lt; / एएसपी: UpdatePanel & gt; मेरे उपयोगकर्ता नियंत्रण के अंदर, मुझे एक फ़ाइल अपलोडर जोड़ने के लिए कहा जाता है इसे बस कोडिंग के बाद, मैंने परीक्षण किया और मेरा फ़ाइल अपलोडर हमेशा खाली है मैंने थोड़ी देर खोज की और पता चला कि यह एक सामान्य व्यवहार था। इसे काम करने का समाधान अद्यतन पिनल के लिए एक PostBackTrigger जोड़ना है। जब मैंने इसे मेरे aspx पेज में जांच लिया, तो मैं इसे करने के लिए प्राप्त किया और मेरे फाइल अपलोडर की फाइल थी। फिर मैंने इसे गतिशील रूप से जोड़ने की कोशिश की (अंततः इसे मेरे नियंत्रण में करवाना), इसके साथ काम किया: PostBackTrigger ट्रिगर = नया पोस्टबैकट्रिग...

ios - UIButton Action not working in swift -

I have two classes UIVIController and UITableviewcell. In UITableviewcell, I have a button and button action should be in UIViewController. I click on the Func button (object: AnyObject) {println ("button click")} cell.createButton (self) / Pre> // UITableViewCell func createButton (Representative: AnyObject) Button.addTarget (Representative, Procedure: "Click button:", Control events: UIControlEvents TouchUpInside)} But the above code is not working. The 'buttonclick' function is not calling I had the same problem even a while back "representative" place. Otherwise try taking a look at this question: I hope to help.

html - Justify images CSS -

इस सवाल का पहले से ही एक उत्तर है: 8 जवाब मैं 3 छवियों को सही ठहराना चाहता हूं , मैंने इससे पहले कभी ऐसा नहीं किया है इसलिए मुझे कोई सुराग नहीं है कि यह कैसे करना है। अब मैं थोड़ी गल गया और संपत्ति को "औचित्य" पाया, लेकिन मैंने देखा कि यह केवल पाठ के लिए ही काम करता है (मुझे सही करें अगर मैं ग़लत हूँ।) लेकिन मैंने निम्नलिखित की कोशिश की। HTML & lt; ul & gt; & Lt; li & gt; & lt; img class = "uspIconOntwerp" src = "चित्र / ontwerp-icon.png" / & gt; & lt; div वर्ग = "uspText" & gt; Ontwerp & lt; / div & gt; & lt; / li & gt; & Lt; li & gt; & lt; img class = "uspIconRealisatie" src = "चित्र / वास्तविकता-आइकन.png" / & gt; & lt; div class = "uspText" & gt; रियलसिटाई & lt; / div & gt; & lt; / li & gt; & Lt; li & gt; & lt; img class = "uspIconPrijs" src = "चित्र / prijs-icon.png" / ...

ruby - Post to Sinatra API with hyperresource -

I created an app in Sinatra with cry (hala / json) and now i have to post a new item I am trying to get the customer to this API. My path to my Sinatra app is: Extend (todo.representer) @ todo.to_json erb: 'todos / new' end post "/ todos" Do @todo = todo.new (params [todo]) if @todo.save redirects "todos / # {@ todo." Id} "and arb:" todos / new "end end and my client.rb looks like this: is required 'hyperSource 'Class APIRQUEST & Lt; Hyper Resource API = APIIEET.N. (Route: 'http://127.0.0.1:9393', Header: {'Acceptance' => 'Application / vnd.http: //127.0.0.1: 9393.v1 + json '}) Api.post' / todos / new ', {: title = & gt; "A"} This does not work The only way to get a working client is to get function: Requires 'hyperites' class APIIQUEST & lt; Hyper Resource API = APIIEET.net (Route: 'http://127.0.0.1:9393/todos/13', Header: {'Acceptance...

javascript - Reloading vs Refreshing page with jquery on shared host -

Image
मैं codeigniter और jquery के साथ काम कर रहा हूँ पृष्ठ को अपडेट करने के लिए, मैं एजेएक्स का उपयोग कर एक जानकारी को एक डीबी ऑपरेशन करने के लिए कोडिनेटर फंक्शन में भेजने के लिए उपयोग कर रहा हूं। $ .ajax ({प्रकार: "POST", url: BASE_URL + "अपडेट / अपडेट", डेटा: {i: खोज आईडी, एम: संदेश}, डेटाप्रकार: 'जेसन', सफलता: फ़ंक्शन (डेटा) {console.log (डेटा);}, त्रुटि: फ़ंक्शन (डेटा) {console.log (डेटा);}, पूर्ण: फ़ंक्शन () {चेतावनी ("रीफ्रेशिंग .."); window.location.href = "Pan_controller / answer";}}); ऑपरेशन पूर्ण होने के बाद मैं पृष्ठ को पुनः लोड करना चाहता हूं। यह आमतौर पर स्थानीय रूप से मेरे WAMP पर काम करता है। हालांकि जब मैं किसी साझा होस्ट पर तैनात करता हूं, तो मुझे आमतौर पर पृष्ठ को मैन्युअल रूप से लोड करना पड़ता है (ब्राउज़र में पुनः लोड बटन का उपयोग करके - ऊपर स्क्रीनशॉट)। मुझे फायरबग में कोई त्रुटि नहीं दिखाई गई मैंने विभिन्न प्रकार के सुधारों की कोशिश की है, लेकिन हाल ही में यह आश्चर्य करना शुरू कर दिया है कि यह मेरी साझा होस्ट...

python - Relationship between I2C operating frequency and sample rate setting in MPU6050 -

I am interested in reading the zerososcope data by Raspberry PI and Python, but I am confused about the way MPU6050 (how to set the sample rate of accelerometer) , xeroscope;) According to I2C clock frequency to avoid incorrect reading data (for example buffer does not contain data, or write and read faster, and so on) in knowledge, each Measurement is a 16-bit word. Is there any connection between the two watches? I have not touched the PI since about 18 months ago with the same chip, so I do not know how things have changed in the meantime In any event, I used smbus to read the chip. Some things that I found harder, were quite slow compared to the i2c block while reading different registers. Besides, you had to shut down sleep mode Sorry, I do not have any information at the time of the clock, but if you are trying to get a well read loop right now, then it can help you use numpy There is no need to do it, but if you are planning to manipulate your samples, then it is very ...

c# - Entity framework relationship issue 'Unable to determine the principal end...' -

I have two squares, like class one {id (pk) Property 2; } I'm getting an error while saving the class two {ID (PK), an_ID (FK), Enlabal_on_id (FK)} 'Unable to determine the main end of X "Relationships can be the same primary key in multiple joint ventures. I tried many combinations WithOutPrincipal and WithOutDependant etc. But no luck, please guide me in the right relationship. If you are trying to keep 1 to 0 or 1 relationship between squares, one and two sections You need the same key in Primary Key and Class 2 and this should be the primary key for Class One Class A {ID (PK), Property 2; } class two {one_id (pk, fk), enlabal_on_id (fk)}

How do I protect front-end javaScript code from being stolen? -

इस सवाल का पहले से ही एक उत्तर है: मैं कैसे सामने की रक्षा करूँगा- चोरी हो जाने से जावास्क्रिप्ट कोड का अंत? मेरे पास एक अंडरस्कोर, jQuery और बैकबोन एप्लिकेशन है I यह एक प्रोटोटाइप है और इसमें कई उपयोगकर्ता नहीं हैं और बैक-एंड कोड बहुत तुच्छ है। इसलिए किसी भी मान फ्रंट एंड कोड में है। मैं इस कोड को चोरी / क्लोन होने से कैसे बचा सकता हूं। क्या पर्याप्त मात्रा में कम किया जा रहा है? ऐसे उपकरण हैं जैसे कि सुशोभित करने के लिए कोड को रद्द करने के लिए इस्तेमाल किया जा सकता है, लेकिन क्या ऐसा कुछ है जो कोड चोरी करने के लिए इस्तेमाल किया जा सकता है? फ्रंट एंड जावास्क्रिप्ट कोड की रक्षा करने के लिए सबसे अच्छा अभ्यास क्या है? आप नहीं कर सकते आप यूगिफ़ीर / ओफफसकेटर्स के जरिए अपना कोड अपठनीय और जटिल बना सकते हैं।

android - Adding support libraries v7, v13 with gradle is not working -

I'm trying to import both the Android support library. I try to implore GoogleMap AP2 in my Android application So I need both libraries so I'm using Android Studio and Griddle. Dependency {compil fileTree (dir: 'libs', includes: ['* .jar']) Appropriate "org.androidannotations: androidannotations: $ AAversion" compilation "org.androidannotations: Androidannotations-api: $ aviation "compilation" com.android.support:appcompat-v7:21.0.+ '// compile' com.google.android.gms: Play services: 6.1 'Compile' com.android.support: Support-v13-18.0. "Compilation" com.loopj.android:android-async-http:1.4.5 "Compository {mavenCentral ()} compile" com.github.chrisbanes.actionbarpulltorefresh: Library: + "Addition" to add -Time: Add-Time: 2.5 '} is an error: Module version com.android.support:support -V 13: 18.0.0 Libraries You have support- v13: 21.0 To use the latest version of. + You...

xcode6 - How to change the shape of a UIButton in Swift? -

I am trying to create an arrow size. I think this will be done with CGRact method, but can you give a full example of how this will be done in SWIFT? This programmatic form can be done by drawing sub-class UIButton and override before that so that the beer path Could make an arrow shape through After this, set the title of the bus button so that you want your text and accordingly, create a position within that size. The advantage of doing this is that you can easily change the color, since the scale and dimension you control how the object is actually being prepared. The complex bezier path is a good tool for drawing I am using the trial version and now I can easily do the size like this.

objective c - How to implement delegate protocol between two NSViewControllers which are managed by an NSSplitViewController -

Image
I'm new to Mac OS X development, I know how to work with the protocol in iOS app development and I understand how he works, now I have a small project in which there is a NSSplitViewController in which there are two NSSplitViewItems and that is related to NSViewControllers ProjectsVC and TasksVC, I am using xCode 6 with the storyboard In ProjectsVC, let me find this pro Ocol is @protocol projectsVCDelegate & lt; NSObject & gt; - (Zero) Selected Project: (JT Project ™) project; @end The question is, how to get an example of ProjectsVC to set up a worker to work in ProjectsVc? When you think of such problems, think about how to decompose things. In a way, your Split View Controller relationship will have to be managed. As soon as your ProjectsVc works as a representative for the JointProject, your Split View Controller can work as a representative for your projects VC. You can call a method by which the SVC knows something that it can take some care, and the...

c++ - understanding operator lookup; which compiler is correct? -

Previously asked, but I did not have the luck to get the answer ... I An uneded container (i.e. hash; we call it que hash because it is probably in any similar situation) whose key type requires an operator operator. Consider the following: // foo.h class bar {public: square fu {}; }; // foo.cpp # include & lt; QtCore / QHash & gt; Namespace {typedef Bar :: Foo Foo; Bull Operator == (Fu Conste & A, Fu Conste & B) {Return & A = A and B; }} UIT qHash (Foo const & amp; foo) {return qHash (& amp; foo); } Int main () {QUTS & Lt; Foo, Int, & gt; Hash; // stuff with hash, e.g., hash.incent (foo (), 5); Return 0; } Using G ++, all right. However, the error lies in the intestinal error of qhash.h about binary expression to the invalid operands where == trying to use foo . I feel that the rings do not have to find or deny the definition of the operator == in the anonymous namespace, probably due to different lookup rules compared to G ++....

SQL Server Partition Switching -

I am trying to implement partition switching in SQL Server 2012. When I try to switch the partition, I get the following error message: "The table is partitioned, whereas the index '_PK' is not partitioned." I have a cluster index (auto-integer integer) which is not the primary key on the partition that I'm trying to switch to a different table. The primary key is a GUID, how do I get around it? Thank you.

asp.net - Using SignalR to send Real Time Notification -

I want to create a new system for sending real-time business execution messages to users using SignalR. In the old system, each client connects to the trading server using the Java applet TCP connection. I use the following tutorials as a reference The stocktizer constructor has a line of code in the update: Share prices: _timer = New timer (UpdateStockProcice, Blank, _updateInterval, _updateInterval); However, instead of updating the stock price per 250ms, I have to update the business execution in real time. Is it OK to make a TCP connection to my trading server per customer in the consultant? It appears that in the sample code, the manufacturer of stock ticker (i.e. My trading manager) will be asked only once, but in my design, I want to make a TCP connection per client. How do I change the code to do this? This is my code: TradingHub.cs Public class TradingHub: {Private Redonly TradingManager _ Trading Manager; Public TradingHub (): This (TradingManor.Instence)...

Including separate javascript file in perl script -

I have set up Pearl CGI webpages that I am trying to do some refactoring but have gone to a wall. Each of these scripts has some JavaScript and CSS, which is currently written in this form: My $ JSCRIPT = & lt; & Lt; Code; Function DUSTF () {// STR}} code; My $ css = & lt; & Lt; Block; . CSS-stuff {} block JavaScript and CSS are later loaded on the page using CGI print $ cgi- & gt; Start_html (-script = & gt; [[[type = & gt; "javascript", -code = & gt; $ JSCRIPT}], -style => {-code = & gt; $ CSS}); Is this code a good way to refactor so that instead of making that JSCRIPT copy in multiple files I have a single common.js or similar File? instead of -code as shown in the CII documentation -src Use . Print $ q- & gt; Start_html (-title = & gt; 'The Readal of Spinks', -cript = & gt; {-Type = & gt; 'JAVASCRIPT', -src = & gt; '/ javascript / sphinx.js'}); Print $ q- & gt;...

css - How to Collapse Left Side Padding or Margin in Responsive Design Layout? -

Problem: I am currently working on a- pdf template; I am relatively new to responsive design and I am having a problem with the following: I have a button at the bottom of the page which I am currently using a set margin-left value. However by doing so, the screen can be rescued from floating 'on all sides' during the shape again. Target: There is a solution that allows buttons to be centered horizontally Padding / Setting the above for Auto Thought of a terrific conceptual ghetto (I technically create the image by making the fluid button I can make a long white rectangle with it, thus resizingable) (Object: Orange button near the squirrel): I want to use media queries for I . Original idea: Media (max-height: 600px) ) {.bottom-button {/ * styles} / @} @ media (minimum-height: 600px) {.bottom-button {/ * different styles}}

android - Alternative Layouts -

I am developing an Android application that supports content design for devices running 5.0+ and 4.1 to 4.4 Want to do I am using the Epcapet library to get some support for older versions. Now I have to face the features that are only present in V21, like height . I can create a layout- v21 folder and add the layout of my activity there again, which has a lot of duplication. Do you do it the other way? Is there any way to use styles for this? How do I create a style from values ​​ to values-v21 Here is a link I have used that gives some information about the overriding style / topics for the v21 lollipop: Basically you can do values ​​/ themes.xml & lt; style name = "Aaptim" parent = "Aaptim .base" /> gt; style name = "Aaptim .base" parent = "theme. App comet "> gt; item name =" color primary "> gt; @color / color primary & lt; item & gt; item name =" color primary diary "...

sdk - Android Studio: Gradle Fatal Error -

Image
I want to go to the Android studio beta version. I downloaded SDK on my official site and studio. Launch XX. I just entered all the necessary areas to create a new test project. While preparing the project, I get an error: I followed some advice from Stack Overlay, I have already done it: Install JDK is appropriate and set it to Advanced Computer Settings Android Studio Restored Android Studio was restored with the installation of Android SDK and updating it Hope someone can help me!

regex - Exclude Some File Types In Express JS Routing -

I want to match all / admin / * requests .png, .gif, .js file type, then this path Type: app.all ('/ admin *', Required login); But I can not exclude file types how can I exclude the .png, .gif, .js request from that routing? how regex \ / admin [^.] *. ^.] * \. Anything other than matches. followed by . (? (?: Png | gif | js)) claims that regex is not followed png | Gif | Js

How to generate a real random number in C? -

I am trying to generate a random probability with maximum probability. How can we generate a random real value between 0 and 0.5 in C? You can not generate actually portable number random at C99 but You can use some (and maybe with the present time) seeds. And the computer does not know about true real numbers. Floating Point Only In fact I believe that the Universe does not know about real numbers (think of some cardinal logic). But ask physicists or philosophers. There are PRNGs in some operating systems or implementations, and some systems (including hardware) are also real random generators. Read more about; If your system has this also reads on Linux, then you can try double_my_random_number/ * between 0 and 0; 0.5 * / = drudge 48 () * 0.5; Almost evenly distributed random numbers> = 0 and & lt; 0.5 If you accept the code in C ++, also see standard headers ...

UIScrollView in Storyboard not working with iOS 8 Size Classes and Autolayout -

Image
So I'm trying to create a UIScrollView in the storyboard, which will allow me to scroll the label UISCroll View Built Up, Up, Bottom, left and right A border of 0 has been created for the distance between neighboring neighbors, which has created a view of subView UIScrollView any height Any height VC with the same width as but the height of 1500 (because I only want to scroll it vertically). Set the closest neighbor to the left, top and right and set a high barrier as 1500. I am going to the top of sub-view and below I put the label when I run the app on iPhone 6, so do not scroll vertically as I want to do any idea why it is not working? thank you in advanced. To get the scroll, you see the sub-view ("Content View") at the top, left, bottom of the view And in addition to the right you have to give it a height (in the "Content view") (not related to the = scroll view), because it is used by ScrollView to calculate its conte...

sql - Try-Catch Error Message Foreign Key Constraint -

After I am trying to write a question that instead of error: insert Confessional statement with foreign key constraint ... ` My own error might be something like this: & lt; Value> & lt; TABLE_NAME> Test Table1: Test table 2 Col1 p tinyint Col2 p tinyint Col2 FK tinyint I have a test Created the following triggers in the form: create TRIGGER [dbo]. [CHECK_INSERT] TINYINT declared as TINYINT as Insert in Table1 for Insert TINYINT declared as @ col2 TINYINT selection @loop = min (col1) in the form @loop declaration included in the selection @ col1 = col1 Where Col1 = where col1 = @loop selection @loop @ col2 = col2 is not present and ERROR_NUMBER ((@ col2 col2 to table2 ou select col2 =)) = 547 RAISERROR start ('% s table2', 16, 1 does not exist, cast (@ col2 as VARCHAR (3)) ROLLBACK TRANSACTION END END I can handle this error Thank you. After You can add the statement in the try / catch, but I think that First trigger instead of the n...

Read Heroku configuration variable from JavaScript -

Image
How do I read a configuration variable setup for a Braun app for example: From the Azure, I can use something like process.env to read environment variable settings. ALERT_ALLOW_TEST However, how can I read this value from the green environment? actually uses the Heroko process. Retrieve values ​​However, in this case the type of value (boolean) was different between Azure and Heroku My Boolean conversation was not taking into account that routine, so it seemed that it was not set but actually set it was going. I was not converting it correctly Here is my regular way of negotiating the boolean that I have modified with another Stakeoverflow post. function to boolean (value) {if (typeof value == 'string') {switch (value.toLowerCase ()) {case "true": case "yes": case "1 ": Truth is back; The case "false": "not" case: case "0": case faucet: return false; Default: Break; }} Return boolean (value); }

javascript - Starting with phone gap -

I am very new to phone difference. I am building a terminology app as a project. This is like 1 page if I select an alphabet and on the next page it should display the words starting with that alphabet. I am facing problems in displaying only words starting with that particular alphabet, which was clicked on the previous page. How can i do it ??? Function OnDevice Readie () {if () {document.getElementById ("word") InnerHTML = "abase"; . Document.getElementById ("options") innerHTML = "low, down"; }} This is the second page's code. What should I pass in the loop? And how do I show it below & lt; Table name = "tb1" border = "2" & gt; & Lt; TR & gt; & Lt; TD & gt; The word & lt; / TD & gt; & Lt; TD & gt; Options & lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td id = "word" & gt; & Lt; / Td> & Lt; Td id = "o...

javascript - Using json_encode without displaying it on my webpage via echo or print -

Basically I'm trying to pass a array of JavaScript from PHP, so far it's using all the methods I'm using. Are: PHP: echo json_encode ($ arrayname); Javascript: $ GetJSON ('myphppage.php', {}, function (data) {// here stuff here}}; Obviously, this is the text echo on my webpage, but this text Should not be shown, I'm just wondering if I have to use it for any purpose, without any firearms on my webpage (I tried it without echoing and it does not work, I also went to countless tutorials on it. But no one can do this without using echo) Thanks long ago ---------- Edit ------------- index.js $ GetJSON ('myphppage.php', {}, function (data) {// I loop through data here}}). (Function () {}); myphppage.php & lt; php $ servername = "name"; $ Username = "user name"; $ Password = ""; $ Dbname = "dbname" ; $ Connection = mysql_connect ($ servername, $ username); if (! Connection!) {Die ("d...

javascript - sticky menu gets stuck with google map -

I have a sticky menu that stays at the top of the screen when scrolled up to 100px, I still have a page But a googlemap sticky menu is awkward and remains on an input search form. I have tried to disable the JS file which is integrated with the map, although it did not help, sticky menus on other pages without the map Works fine with Firefox and also p On the other hand, the sticky menu also works fine on the thigh. Now what's wrong in my chrome im on the verge of losing my mind .. Here's the page that I have problems with you. Scroll down and scroll upwards to get the problem, this problem does not appear on Firefox, so my suspicious is Chrome itself .. Where should I see any advice or What problem arises Might be possible? Here is a sticky menu running JS. Function sticky_manu () { jQuery ('.header'). {Offset: {top: jQuery ('. Sticky_menu'). Offset (). T session}}); JQuery ('. Haider-Medium'). Afix ({Offset: {Head: jQuery ('. Chitchime...

php - variable in mysql query, NOW() + INTERVAL $variable -

$ someDays = 2; इस चर को इस mysql क्वेरी में कैसे रखा जाए? ये काम नहीं करते: mysql_query ("उपयोगकर्ताओं को अपडेट करें (वैधता) मूल्य (अब () + अंतराल 'कुछ दिन' दिन) जहां आईडी = '$ id'"); Mysql_query ("उपयोगकर्ताओं को अपडेट करें (वैधता) मूल्य (अब () + अंतराल कुछ दिन का दिन) जहां आईडी = '$ id'"); Mysql_query ("उपयोगकर्ताओं को अपडेट करें (वैधता) मूल्य (अब () + INTERVAL '"। $ कुछ दिन। "' DAY) WHERE id = '$ id'"); Mysql_query ("उपयोगकर्ताओं को अपडेट करें (वैधता) मूल्य (NOW () + INTERVAL"। $ कुछ दिन। "DAY) WHERE id = '$ id'"); आप जिन टिप्पणियों का उपयोग कर रहे हैं INSERT वाक्यविन्यास लेकिन प्रयास एक UPDATE करने के लिए निम्नलिखित की तरह कुछ काम करना चाहिए: mysql_query ("यूटिडेट उपयोगकर्ता सेट वैदिकता = DATE_ADD (अब (), INTERVAL $ कुछ दिन DAY) WHERE आईडी = $ id"); संपादित करें: $ कुछ दिन दिन को मौजूदा वैधता मान जो आप कर सकते हैं ... SET वैधता =...

java - Wrong value injected with Spring PropertyPlaceholderConfigurer -

मेरे पास दो गुण हैं: prop1.properties: prop1.sample = value123 और prop2.properties: prop2.sample = value234 जब मैं इन गुणों को इंजेक्ट करता हूँ, तो मेरे " InjectValues ​​"बीन तो सब कुछ एक उचित तरीके से काम करता है लेकिन जब मैं वैल्यू के बजाय प्रॉपर्टीप्लेसहॉल्डर को बढ़ाता है तो एक संपत्ति प्लेस होल्डर से किसी अन्य क्लास के मूल्य को इंजेक्षित करना चाहते हैं, तो नीचे दिए गए कुंजी को डाला गया है। & lt; bean id = "propertyConfigurer" वर्ग = "org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" & gt; & Lt; संपत्ति नाम = "स्थान" & gt; & LT; मूल्य & gt; फ़ाइल: C: \ test \ prop1.properties & lt; / मूल्य & gt; & Lt; / संपत्ति & gt; & Lt; प्रॉपर्टी नाम = "प्लेसहोल्डर पिरफिक्स" मान = "$ {" / & gt; & Lt; संपत्ति नाम = "प्लेसहोल्डर शफ़िक्स" मान = "}" / & gt; & Lt; / सेम ​​& gt; & Lt; बीन आईडी = "प्रॉपर्टी कॉन्फ...

c - How do you cast a pointer to a character without using an ampersand? -

For a project I want to push the pointer from an int to switch a byte Hex There is only one warning on prices that I am not allowed to use ampersand. So I've worked with this line of code: int x = 5000; Char * ptr = (four *) & amp; X; But clearly I need to find a way to insert this indicator without using ampersands. Does anyone know of a way to do this? I am searching and I have not found a way that is not included in the use of ampersands or other operators to use me (|, [,], >, ^) Not allowed. Make an association. union myUnion {int x; Four c [4]; } U; Char * ptr = u.c; U.x = 5000;

html - Nested comments in Bootstrap 3 -

I want a list of comments in Bootstrap 3. The list needs to handle nested comments. I have tried with media in bootstrap but there is no full width in media containers (). I have a red background to illustrate the problem. Has anyone made a nested comment list? I do not think the media component in bootstrap is good enough. & lt; Ul class = "media-list" & gt; Why not use MediaList component in Bootstrap 3 & lt; Li class = "media" & gt; & Lt; One class = "media-left" href = "#" & gt; & Lt; Img src = "..." alt = "..." & gt; & Lt; / A & gt; & Lt; Div class = "media-body" & gt; & Lt; H4 square = "media-title" & gt; Media title & lt; / H4 & gt; ... & lt; / Div & gt; & Lt; / Li & gt; & Lt; / Ul & gt; Task Bela

java - JavaMail save Password -

I am working on implementing JavaMail in my current program. If I predefine the credentials directly into the code or write it through the text / password fields, then test mails are sent successfully, but I want it to be more user-friendly. I am using a MySQL DB for my program where I can store SMTP passwords but for security reasons I do not want it in Claretext and I know that the only option will be a synchronous encryption and the user login password is password protected Will use as. Is there any other option to safely store passwords or other options that the user does not need to enter their password all the time? To make sure, this will be an option through the checkbox to save only the credentials, if the user does not want it, then it must be typed at all times. Thank you for helping. The password is encrypted (in the hahad) database. Encrypt with example Libs: string password = "PASSWORD_TO_ENCRYPTED"; String Salt = Password + Username; // Password...

c++ - how to add probabilities to the game? -

This program works well, but like a true casino owner, I want to minimize payouts as much as possible without adding more possibilities. The way I want to do this is to add possibilities to each number. There are 8 possibilities (2,3,4,5,6,7,8,9) I want 7 to be the least Therefore, I want to set the probes as 2 to 75% (which is 15% each), 8% to 20% (10% each) and 7% 5%. Can someone help me? #include & lt; Cstdlib & gt; # Include & lt; Iostream & gt; # Include & lt; Semith & gt; # Include & lt; Ctime & gt; using namespace std; Int random (int less, int hi); Int results (int a, int b, int c, int chips, int beat); Int main () {srand (time (0)); Int, less 1 (2), less 2 (2), less 3 (2); Int High 1 (9), High 2 (9), High 3 (9); Int menu = 0; Int beat = 0; Bool quit = 0; Cout & lt; & Lt; "Player Chips: $ 1000" & lt; & Lt; Endl; Int chips = 1000; While (Skip) {cout & lt; & Lt; "1) Play Slot 2) Exit."; Cin & g...

meteor - Multiple Spacebar Conditional Operators -

क्या कम करने का कोई तरीका है {{# if arg1}} {{# अगर arg2}} // सामान {{/ if}} {{/ if}} सिर्फ एक ही है? {if # Arg1 arg2}} {{#if arg1 & amp; amp; Arg2}} उपर्युक्त दोनों काम नहीं करते। स्पेसबर्स मूसा और हैंडलेबर्स के तर्क को कम-से-कम टेम्पलेट भाषाओं के रूप में जारी करते हैं यही कारण है कि टेम्पलेट के बजाय नियंत्रक में भी सरल तर्क भी रखा जाता है। आप, हालांकि, जो तार्किक और करता है। & lt; टेम्पलेट नाम = "ifand" & gt; {{#if arg1}} {{#if arg2}} {{& gt; Template.contentBlock}} {{else}} {{& gt; Template.elseBlock}} {{/ if}} {{else}} {{& gt; Template.elseBlock}} {{/ if}} & lt; / template & gt; इस रूप में कॉल: {{ifand arg1 = "foo" arg2 = "bar"}} // सामान {{/ ifand}} आप भी सीख सकते हैं। सामान्य मामले ( और में तर्कों की एक मनमाना संख्या के बीच), आप एक वैश्विक टेम्पलेट सहायक: Template.registerHelper ('और', फ़ंक्शन) {var args = Array.prototype.slice.call (तर्क, 0, -1); // कुंजी बहिष्कृत = म...

python - Copying a range of columns from a text file and creating a new file -

I'm new to Python and I'm parsing some data for some sonar files, for which I need to process more information. I have received this code and I am trying to manipulate it to fulfill my goal. I only need the information of the first 53 columns, the previous 100+ column external data is not required. In line for f: if line.strip (): f = open ("ADV125cm.txt", "r") g = open "ADV125cm_fixed.txt", "w") G.write ("\ t" .joined (line split (0,53) [1:]) + "\ n") F.close () g.close () I have received this error code and I do not know what it means: Type error: Expected one character buffer object Any help You get typeError: a character buffer object is expected / Code> because string is expected Sorting characters you are going through 0, 53 Maybe you are confused with piece operation If you want to get 53 of the first row columns , then you need the line [: 53] . To implement this change your for loo...

docusignapi - Does RequestEnvelopeHistoryToken exist in SOAP API? -

I am trying to use RequestEnvelopeHistoryToken via the SOAP API. My solution is currently sent undetected, sending thanks to the requestSenderToken method, but RequestEnvelopeHistoryToken does not exist within my example of DSAPIService. Has this method been disliked? I am currently using SOAP API exclusively, but I would consider using REST for this purpose if the same functionality exists. Public class ServiceWrapper: DSAPIService {// Override of GetWebRequest} Public class DocuSignJob {public string GetSenderToken (string envelope, string accounted) {string sendurl, historyurl; (ServiceWrapper client = New ServiceWrapper ()) using {sendurl = client.RequestSenderToken (_envelopeID, accounting, "http://www.google.com"); // work historyurl = client.RequestEnvelopeHistoryToken (envelope, "http://www.google.com"); // There is no definition for ServiceWrapper 'RequestEnvelopeHistoryToken}}} I consider (Probably legacy, maybe bug, maybe some more) but Req...

mySQL for loop stops working after 31 row updates [SOLVED] [Actually PHP related] -

I have a form that submits to the loop after using PHP. The loop updates individual rows in the database, which is presented after the next on the basis of the data of the form. However, I have found that if more than 31 lines need to be updated, then it stops working, it will make a complete update for the first 31 loops but will not work after the 31st loop? Update: I have done some tests and it seems that the loop never ends, this result refreshes the page in the browser instead of printing it. Any idea what's going on? Has it ever happened to someone else? Is there a MYSQL query setting anywhere that it is creating? For ($ i = 1; $ i & lt; = $ total_results2; $ i ++) {Any help would be highly appreciated.} $ StrSQL = 'update timesheets_items SET'; $ StrSQL = 'Time_1 = "'. Convert_time ($ _ POST ['item_'. $ I. '_time_1']). '' '$ StrSQL. =', Time_2 =" '. Convert_time ($ _ POST ['item_'. $ I. ...

oracle - How to resolve ORA-01795 in Java code -

I got an error in my code ORA-01795 error while executing more than 1000 records . I'm thinking of dividing this into a batch of 1000 entries, such as the separation of the following sections from different sections: to select * from table_name where column_name (V1, V2, V3, ... V1000) or column_name (V1001, V1002, V1003, ... V2000) I have a string ID like -18435,16690,1719,1082 , 1026,100759 .. which is generated dynamically based on user selection. How to write logic for a situation like 1-1000 records in Java, 1001 to 2000 records etc. Can anyone help me here? There are three possible ways to this limit: 1) As you did before Only mentioned: Divide the statement in 1000 batches 2) Create a derived table using values ​​and then join them: with id_list (id) In the form (select 'V1' from Dual Union, choose from two options 'V3' double selection from Dual Union) Alternatively, you can also join those values ​​- it can also be fast As with ID_...

Item is not being added in the dropdown list #Asp.net -

I've added a dropdown list in the webform and added two items through the Edit Item option. While debugging this page, I'm adding a new item (using a text box and a button for this) that is displayed in this drop down list, while only once I close the session And if it is opened again it is disappearing. The code for: .aspx page: & asp: dropdown list id = "dropdown list 1 "runat =" server "height =" 22px "width =" 82px "& gt; & Lt; Asp: ListItem text = "Select" value = "- 1" selected = "true" & gt; & Lt; / ASP: ListItem & gt; & Lt; Asp: ListItem Text = "Item1" value = "Wrigley" & gt; & Lt; / Asp: ListItem & gt; & Lt; Asp: ListItem text = "Item2" value = "sigma" & gt; & Lt; / Asp: ListItem & gt; & Lt; / ASP: DropDownList & gt; & Lt; Asp: Button ID = "Bt_Save" runat = "server...

php - Routing static urls in javascript files in symfony -

I have some javascript files in my java Symfonyt2 project that has some formula from the Javascript file Dynamically loaded for example: $ ('. Records_list'). Datatelle ({"language": {"url": "../shared/js/datatables.persian.json"}}); URLs work in pages with ../shared / js / datatables.persian.json URLs like / test but This fails with the url Ic / test2 / action in the pages. How can I fix this? What is the cssrewrite filter for the addict? Can I make the route for such a URL? If you do not have many such cases, you can use the Store your file path with a twist: & lt; Div id = "file-store" style = "display: none;" Data-value = "{{property ('shared / js / persian.jason')}}" & gt; & Lt; / Div & gt; and recover it in JS: var shared file = $ ('# file-store'). Attr ('data-value'); $ ('. Record_list') Datatelle ({"language": {"u...

java - Relational Data is Not Fetching in Ebean -

background I am using (Java) to store data. The Play Framework uses to convert classes into data that can be stored in the database. The problem I am currently having trouble bringing the relational data completely. I have a user and a UserEmail model. user can be multiple UserEmail s When I try and user , then the user data is loaded properly, but is not usermail s. When I specifically code to fetch fetch ("email") User.find.fetch ( "E-mail"). where (). Eq ("userId", testUserId) .findUnique (); This gets at least email as it does the limit, though when I try and show them through return (Jason. Tosan (Retrieved Test User)); I get question is there any way I get the game structure / EBI automatically without having receiving the email Can "email") in every query? Maybe a comment? How do I solve the above error? Why is it thrown away, but how can I fix it? Is there any way by which only one lev...

.htaccess - Getting laravel to work with Apache 2 -

Then I'm new to Laravel. I have been able to develop using Mac OS X, so at first I thought it would be a very good idea to use the Homestead but nginx, which I barely when I sys admin Use the know-how to know a lot about apache2. So tonight, I grabbed my dedicated server (which is faster to download a lot through the composer dependence), LL paste.debian.net/130339 / / var / www / AMI _> LL able ➜ sites / var / www / AMI Total 100K drwxrwxrwx 12 root root 4.0K June 1 20:16 app -rwxrwxrwx 1 root root 2.4K Jun 1 20:16 artisan drwxrwxrwx 2 root root 4.0K November 5, 00:18 bootstrap -rwxrwxrwx 1 root root 697 Jun 1 20: 16 composer.json -rwxrwxrwx 1 root root 58K November 5, 0:18 Composer K Lock -rwxrwxrwx 1 root root 146 june 1 20:16 c ONTRIBUTING.md -rwxrwxrwx 1 root root 567 Jun 1 20:16 phpunit.xml drwxrwxrwx 3 root root 4.0K June 1 20:16 public -rwxrwxrwx 1 root root 2.1K Jun 1 20:16 -rwxrwxrwx 1 root root 519 readme.md Jun 1 20:16 server.php drwxrwxrwx 20 root root ...

ios - Making a view centered on the remaining space -

Image
I have this view controller that shows a navigation bar at the top (white box at the top) and a toolbar at the bottom (orange Box in the picture). Because the navigation bar is something, when the view controller is visible, the view controller is added, then the high screen size of self.view will be reported as minus 44 points. > I've added an image view in the scene and I want to intermediate between the navigation bar and toolbar, as seen in the following picture. Whatever I did, That image was vertically to add an obstacle to centralizing the center. As you see in the picture, Xcode shows that the imageView is fully stacked because I want to focus, but it does not happen when the app runs (thanksgiving). In practice, this is what happens: Suppose I am running on iPhone 5. The iPhone 5 has 5 screen high 568 points. Because there is a navigation bar, the hight of self.view will be 524 pt (568 - 44). The hindrance will ignore the top 44 pixels neglected where the nav...