Posts

Showing posts from January, 2012

android - ViewPager+FragmentPagerAdapter app running slow with one fragment having GridView -

In my view, the ViewPager contains three pieces of ViewPager. I and Gridview for each grid containing images for a grid I am using (6 images). When I make changes with the plane text with gridview and slice, swipe is actually very slow. I started Gridview and Layout Inflator, which is responding to Slag. Should I use the FragmentStatePagerAdapter ? But the number of pieces I'm using is only 3. How do I make smooth transitions between different tabs? Code for slice class with gridview Push the mainTourism section {@Override Public View onCreateView (LayoutInflater inflater, ViewGroup container, bundle) SavedInstanceState) {// TODO Automatic Created Method Stub ViewGroup rootView = (ViewGroup) inflater.inflate (R.layout.fragment_tourism, faucet) extends; Gridview Gridview = (Gridview) Routeview.FindvibIID (RIDGDView); Gridview.setAdapter (new tourism image adapter (getActivity ()); Return root view; }} Code for adapter class Public class TourismImageAdapter exte

php - why page redirect to home page when try to change language? -

First of all, my problem occurs when I try to change a language in the website, the language changes, but Then it redirects to the home page, not the current page, though the change in language is a success but how can I change it on the current page? This code is from the inc.language.php file The code is such. After connecting to db if ($ numrows_langs> 1) {$ languagelist = "& lt; form action = \" \ "method = \ "Post \" name = \ "language_form \" & gt; & lt; table cellpadding = 0 cells = 0 style = \ "padding: 5px 0px \" & gt; & lt; tr & gt; & lt; td Style = \ "padding-right: 5px \" & gt; $ LANGUAGE & lt; / td> & lt; td & gt; & lt; choose name = \ "lang \" onchange = \ "document.language_form Submit (); \ "Style = \" width: 110px \ "& gt;"; While ($ r_langs = mysql_fetch_array ($ sql_langs)) {$ LangID_langs = $ r_langs ["

java - How to create user/roles relation in UML class diagram? -

Image
I have a few weeks searching for a UML class diagram for the project. System What kind of relationship can I establish between classes? Is this class right? Do I need other classes? Thanks in advance! I take a shot on it. The session object is a combination union with the user (without the session the user can not have a session, without the user can not have the session.) Users have a combination association with roles (the user can not be without roles) sessions The creator creates the user object, the user constructor creates a role object for each valid role, and stores / dictionary / Array / whatever it puts. You should not associate directly with sub-classes, because the roles of each type of user are highlighted by the user's way in the valid roles Whether or not the session reaches legitimate roles.

php - Sort files by date latest at top Using RecursiveDirectoryIterator -

By default, I do not want to display it by alphabet in the same way that I recursive directoryititor I want to sort the files using the latest files in descending order. In addition to if the date to compare the situation is & amp; Get files from that date & lt ;? Php $ search_path = 'D: \ xampp \ htdocs'; $ File_extension = 'php'; $ It = new recurring directorytitle ("$ search_path"); $ Display = array ($ file_extension); Forex Currency (New Recursive Iterator Iterator $ $ as file) {$ test = Array (); $ Test = Explosion ("/", Date ("m / d / y", File Time ($ file))); $ Year = $ test [2]; $ Day = $ test [1]; $ Month = $ test [0]; If (($ year> = 2014) & amp; amp; ($ month> = 1) & amp; amp; amp; amp; amp; amp; amp; amp; amp; nbsp;% (& gt; = 15)) {echo " Lt; span style = 'color: red;' & Gt; "; Echo "& lt; b style = 'color: green;' & Gt; ". $ Days '-'.

c#(.net) run shell script on windows by cygwin -

I have some shell scripts (bash) working correctly on the Mac. But I run them in Windows on C # I like. I think Sagvin can do this but I do not know how to write code. Can somebody help me out? You can use process class to use CYGWIN under C #. There are other questions to deal with: The question is:

c# - Get a control from a winfrom inside a tabbar control -

I have a tabbar control and inside the first tab, I have a text box, what do I want when the tab for the first time is selected , The text box will be auto-focused. I can use the tabbar selected index converted event, but can not access the text box to auto focus. Any ideas? I am doing this while adding to the tabbar: capture = new capture format (photographer name); Capture Tapelevel = false; Capture Visible = true; Capture.formband style = system.window.form.formborder style.No; Capture. Doc = DocStyle. fill; TabControl1.TabPages [0] .Controls.Add (capture); Capture = new capture format (photographer name); Capture Tapelevel = false; Capture Visible = true; Capture.formband style = system.window.form.formborder style.No; Capture. Doc = DocStyle. fill; TabControl1.TabPages [0] .Controls.Add (capture); And this is my tab change event: Private Zero TabControl1_SelectedIndexChanged (Object Sender, EventArgs e) {switch (tabControl1.SelectedIndex) {case 0: // I want to use

map - get the current location in ios8 -

I am using the code to get the user's current location, its work is with ios7 but ios7 It is my code, please tell me where it is wrong: {// Start Location Manager mLocationManager = [[CLLocationManager alloc] init]; [Delegate MLocationManager: self]; // We actually get the current location only once, the next line is almost pointless // [mLocationManager setDistributionFilter: 100.0F]; // 100m / / [mLocationManager SetCidid Actuci: KCL LaunchexCound HundredMeters]; // 100 meters [mLocationManager setDiscid ActiCouci: KCL LaunchAquaresArest]; // 100m} To get the current location, work it in ios8 for me Is doing _locationManager = [[CLLocationManager alloc] init]; // Manager_pace to start position Manager .delegate = self; // We set the location manager representative for our own location _locationManager.desiredAccuracy = kCLLocationAccuracyBest; [_locationManager startUpdatingLocation]; // Adding this line to update location

laravel 4.2 pipe basd validation error -

फ़ॉर्म सबमिट करते समय त्रुटि हो रही है त्रुटि अपवाद (E_UNKNOWN) $ rulesvalida = array ('txt_name' = & gt; 'आवश्यक: न्यूनतम: 3', ' Txt_phone_number '= & gt;' आवश्यक: संख्यात्मक | न्यूनतम: 8 ',' txt_street_name '= & gt;' आवश्यक | न्यूनतम: 3 ',' txt_house_number '= & gt;' आवश्यक: न्यूनतम: 3 ',' txt_floor '= & gt;' 'आवश्यक: न्यूनतम: 4', 'txt_post_town' = & gt; 'आवश्यक: न्यूनतम: 4', ' Txt_country '= & gt;' आवश्यक ',); वापसी वैल्यूएटर :: बनाने ($ डेटा, $ rulesvalida, Lang :: मिल ('सत्यापन'));

fortran90 - Using array member as the control variable of do loop in fortran -

I was surprised that you can not keep the array member in the loop as a control variable for the loop: < / P> Program testing integer, dimension (2) :: I do (1) = 1, do 3 (2) = 1, 3! Edit: > Or is it allowed but am I doing wrong? There is an error message from ifort v 11.1: test.f90 (4): Error # 5082: The syntax error, while expecting one of the identifier 'I' Found: (%:. = = & Gt; I (1) = 1, 3 ------- ^ test.f90 (4): Error # 5082: Syntax error, found ',' when these There is no hope: & lt; END-OF-STATEMENT & gt; I (1) = 1, 3 --------------- ^ test.f90 (5): Error # 5082: Syntax error, while identifying 'I' found one: (%:. = = & Gt; I (2) = 1, 3 ------- ^ test.f90 (5): Error # 5082: Syntax error, found ',' when one of these It is: & lt; END-OF-STATEMENT & gt; I (2) = 1, 3 --------------- ^ Test .f90 (4): Error # 6535: This The variable or component must be derived or structure type [DO] I (1) = 1, 3 ---- ^ t

html - How to set the limit for multiline textbox in asp.net -

I am using multiline textbox , now I want to allow all the characters in it And I also want to use the regular expression to set the limit of text box to 150 characters so that anyone can help me I am using this regular expression: "^ [A-Za-z0- 9 \ s! @ # $% ^ & Amp; (; _ _ = ~ ~ ~ \\\] <[{}} '' :::???? Gt; & lt;] * {1,150} $ " All work A but it does not limit the characters to 150 Thanks in advance. It's really easy to do this: New browser , But the maximum length on textarea elements (but not older versions of IE9 and Internet Explorer) or at least characters Get count of if you want to show "X face balance" (like posting a comment in SO). For older browsers this will check against javascript maximum length and will prevent the user from typing. However, since users can potentially defeat the keydown approach via copy and paste, so using keyup to reduce any overflow is a Good idea, apart from this, if the data is

Selenium 2.0 Remote web driver fails to start IEDriver with C# -

abilities of desirable abilities = desired capabilities Internet Explorer (); System.Environment.SetEnvironmentVariable ("webdriver.ie.driver", @ "C: \\ IEDriverServer.exe"); Example = New Remote Web Driver (new urie ("http: // localhost: 4444 / wd / hub"), capabilities); I also have a system variable set, and IEDriverServer is in the system path. I can not run IEDriver from the command line (which I think there is something wrong with path configuration, or some security restriction) Note that hubs and nodes are another machine only When I execute the test, I get: "system.InvalidOperationException: The path of the driver executable should be determined by the webdriver.ie.driver system property; ... "[Enter image details here] [1] I'm running this one machine Acting to act as a hub and a node, both of which will work for me. "> There are many things I ask about your attitude that you are trying to fulfill. First

javascript - setRadius: not a number, Google Maps V3 in MVC 5 -

I am trying to show a map with a circle in a marker and a MVC 5 project. Displays the map with the marker, but the error set radius is found on the circle method: no number. Code here: & lt; Script type = "text / javascript" src = "http://maps.google.com/maps/api/js?sensor=false" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; $ (Document) .ready (function () {initialize ();}); Function initialize () {var myLat = '@ Model.Lat'replace (', ','. '). replace the (' ',' '); Var myLong = 'Model' Loan'. (',', '.'). replace the ('', ''); Var rad = '@ Model.Acc'.replace (', ','. '). replace the (' ',' '); Var center = new google.maps.LatLng (myLat, myLong); // LatLng var mapOptions = {center: center, zoom: 16, mapTypeId: google.maps.MapTypeId.ROADMAP} at the center point of the circle;

qt - QTableView - set the first column as "read only" -

I have a QTableView based on QTandardItemModel. I want to set the first column as "read only" and all other columns are editable. I am not an expert on Qt and OOP, I searched around the web and in the QT-document and I 'I understand that I am going to change my model's flag (CONST COMEDAL INDEX & INDEX) function again. Need to do it, but I do not know how and where to re-execute. Thanks in advance! You should create a new category derived from QStandardItemModel , the Result Mode Flags and use your new class instead of the standard one. class MyModel: public QStandardItemModel {public: virtual Qt :: ItemFlags flag (const QModelIndex and index) const override {Qt:: item flag result = QStandardItemModel :: flags (index); If (index.column () == 0) // 0 is the first column! {Results & amp; = ~ Qt :: ItemIsEditable; } Return results; }} Another way to do this: - Create a new class from QStandardItem , reimplement flag By the same way - Cal

phpstorm - In PyCharm, is it possible to disable hiding style tags? -

Image
When I have a string of HTML in PyCharm, then I type the style style = "..." / Code> and only when I click on ... , I can see style content. Are disabling this feature and always showing style tags? In your IDE screen < Li> Find code folding section uncheck HTML style attribute options

scala - Extending Enumeration -

I have implemented a method withNameOption which gives none If counting member with specific name is not found but I have trouble removing this in one attribute to use it for all enumeration in the app. Currently the code looks like this: Expand the computation with the type of object file type EnumUtils {type} with the file type = name def name (name: string): option [FileType] = {something (WithName (name))} {case_: NoSuchElementException = & gt; No one} Val Scala, Java, Ruby = Value} Use this type. Type wherever possible, type not checked. I think this is the pattern you are looking for: Properties EnumUtils {thisenum: enumeration = & gt; Def withNameOption (name: string): option [thisenum.type # Value] = {hold something (thisenum.withName (name)) {case_: NoSuchElementException = & gt; None {}} Object file type EnumUtils {{FileType = Value val value, Java, ruby ​​= Value} With the extension of the math {def main (args: Array [String]): Unit = {pr

java - Android and servlet communication and displaying -

I have the name of an Android app that model and String which sends Java Servlet it Adds Weblet's combo box for servlets this is not happening yet, the following exception is seen in Logcat. 10-28 14: 25: 05.733: D / Exception (7518) ): java.io.FileNotFoundException: MyServletProject / Connection_Servlet this is my app code on public void (see V) {switch (V .getId ()) {case R.id.doubleme: new thread (New Runnable () {public void run () {try {uRL url = new URL ( "Http://l92kl68klk5:8080/MyServletProject/Connection_Servlet"); // URL Url = new URL ( "Http: // 10.0.2.2:8080/MyServletProject/DoubleMeServlet "); URLConnection connection = url.openConnection (); string inputString =" 11 ", the string model = getDeviceName (); // inputString = URLEncoder.encode (inputString," UTF-8 " ); Log D. ("InputString", InputString); Log D. ("Input String", Model); Connection.setDoOutput (true); / OutputStream Water Out = New

parsing - How to complete ML type-inference algorithm given a parse graph -

Image
I want to try to use a ML type-guess algorithm for a specific function declaration. I have a parse graph - how can I use it to detect the Type Checker output? Function: Fun f (g) = g (g) + 2; Parse graph: < P> I usually only understand programming, but I do not have relevant information for this. A sensible approach must be implemented because the algorithm w applies to you type implementation on the Hindu Which will have the continuous characteristics of the ML family language implementation.

javascript - How to timestamp derivative posts or comments to a post? -

I am working on a tutorial and thought it would be good for timestamp comments well. What is it that the timestamp works for posts, but for the post's derivatives or child, or for the sake of simplicity, we can say comments to them. As I use firebase, I'm not sure how to put it into a firebase There is a simplified version in the planker. If you know firebird, feel free to write a version that has a hook with firebase . http://plnkr.co/edit/QKGMIZWVwjHPrPXATY3U?p=preview Appreciate your advice! Thanks! Miscellaneous infor Parent post for general, this is what I have done. in the plunker Add: function (post) {this.posts.push ({id: This.posts.length, url: Post.url, Title: post.title, Created: New Date (). ToUTCString ()}); , timestamp: new date (). ToUTCString ()}; HTML is both for plunkr and actual extent ... build time: {{post.created }} How should I schedule child posts? Apart from the changes I've made ... see postview.js line 2

javascript - A Vimeo <iframe> embed hijacks scrolling/swiping events -

We're using, it provides experience like a slideshow. We are embedting a Vimeo iframe in one of the slides, which should contain the entire slide. Everything works as a charm in Chrome, but it is impossible to scroll / swipe in Firefox and IOS Vimeo iframe full page will not just react to it. I tried to cover the video with a transparent device. Again, it works in Chrome, but the browser on iOS will not allow you to start the program program, so covering the video with a div is unable to start the video: Vimeo Player "Unwanted error : The viewer must start playback first " Is there a solution to this problem? There is a demo of the problem here: the video is on the second slide, scrolling / swiping it will not change the slides in Firefox and IOS. You can try this CSS solution: element {Touch-Action: Pan-Y! Important; } Where the element will put you VEEMO embed code / id I did not test it, but I had another issue where I had and where the Skype act

Change youtrack issue id -

Brief: Is there a way to change (YouTrack-API or somehow) Problem ID from S-5 to S-30? The full story: We have created the YouTrack project to track scientific equipment, which we produce. One device - With a problem custom field, we made a very convenient way to handle "Device Stories". We have only one problem, that the device has its ID number. If we can change problem ID, then it matches the device ID, it will be very useful especially useful, when we refer to any device with other issues and other projects, and the actual device id, etc. Link with. Currently it is not possible. There is a fairly old feature on this:.

widget - How to hide some paths while browsing using the XType browsefield? -

In my component dialog, I enable browsefield Use XType and select a page: & lt; Page jcr: primary type = "cq: widget" field label = "page" name = "./ path" xtype = "browsefield" /> At the same time, I want to make some pages invisible. Suppose I have the following structure: page / page 1 / page 1_1 / page 1_2 / How do I page / page 1 / Page 1_2 is invisible, so that they can browse through the page tree, anyone can choose it? Browsefield is a excluded xxtype; this feature has the option of this replacement is. Pathfind has a property named predicate which can be used for filtering. You can create and register a custom mistake that makes a false return for the paths that appear in the dialog. Name of the custom word can then be given to the pathfile configuration. You can find a detailed tutorial on this: For more information about the forecast, the following links may be referenced:

Android use ActivityForResult in ArrayAdapter with AlertDialog -

After In my ArrayAdapter I have a AlertDialog with a button . Now I want to use the ActivityForResult for this simple code I can use a intent to see other activity , but I In the ArrayAdapter the data can not pass from it. Public Class AdapterReceiveSMS ArrayAdapter & lt Spread ReceivedItemStructure & gt; {Private myDialog dialogue; Public AdapterReceiveSMS (ArrayList & lt; ReceivedItemStructure & gt; Array) {Super (G.context, R.layout.rsms, array); } / * ----- Forward Button ----- * / forward_button.setOnClickListener (New View.OnClickListener () {@Override Public Zero onClick (see v) {AlertDialog.Builder Builder = New AlertDialog.builder click on From (G.activityDialogContext); see vForward = G.inflater.inflate (R.layout.forward, tap); builder.setView (vForward); Last AlertDialog sms_dialog = builder.create (); sms_dialog.show (); from_file SetOnClickListener (see the new OnClickListener () {@Override click on Public Zero (see V) {intent filebrowser

javascript - Selection radio button -

Stuck slightly on where to go from I would like my radio buttons to return the value of the selected button but Right now, it only returns the price of the first item. How can I find it through all the values, this is my code. < & lt; Script & gt; Function myFunction () {var x = document.getElementsByName ('os'); Var rate_value; {If (x [i] is checked for (var i = 0; i & lt; x.length; i ++) {rate_value = x [i] .value; break; }} Document.getElementById ("Demo"). InnerHTML = rate_value; } & Lt; / Script & gt;

algorithm - Greedy Attempt for covering all the numbers with the given intervals -

After the s has a set of intervals (n numbers of intervals) having two natural The numbers that can be found together and a list of n h numbers (containing n numbers of numbers) I want to put the smallest subset of each number for such that SK (P) calls in our list N, at least one gap in P which is included in it Overlapping intervals in P is allowed. Trivial Example: S = {[1..4], [2..7], [3 .. 5], [8..15] , [9 .13]} N = [1, 4, 5] // so P = {[1..4], [2.7]} I think a dynamic The algorithm can not always work, so if someone is aware of the solution to this problem (or similar), then it would be great. I am trying to make o (n ^ 2 solution) Here is a greedy approach P = {} for each q: If in P / O (N) every q continues in S / O (N) in O / O (n) then q: I o / o (n) p. Ed (i) break but that is O (N ^ 4). O (N ^ 2) Any help to create a greedy approach would be great! Thank you! * Update: * I am making a mistake on this problem and I think I have an (O ^ 2)

Android ffmpeg apply video effects take log time -

I'm using commands to implement the effect, to apply effects for 2 minutes of video May take 6-8 minutes. Please help me improve the effective time for the ffmpeg command. string commandstracker "ffmpeg -y -i" + mVideoData.getPath () + "- experimental-vf curves = vintage -s 640x480 -r30 -spect 4: 3 -Ab 48000 - A2R 22050-B20979 -Vodcast MPEG4 / SD Card / VideoKit / CRVMMP4 ";

java - How to create (TOC) table of content and add it after merging multiple pdf reports together in one pdf -

मैंने बैच निर्यात मोड (जेआरपीडीएफ एक्सपोर्टर और जेरेक्सपोर्टरपेरामीटर। जेएएसपीईआरपीआरआईएनएलएलटी) का इस्तेमाल करते हुए कई रिपोर्टों को सम्मिलित किया है। अब, मैं कोशिश कर रहा हूं मेरी रिपोर्ट के लिए TOC (सामग्री की सारणी) बनाएं धन्यवाद एचटीएमएल>

function - RE: check for every X increment in C -

I have a function that automatically runs every second, inside the function I have a counter "i" Increases from 1 to 1 second. I do not want to run stuff on every second, but every x seconds every 10 seconds. So I think the best way is to find I increment increments, when it grows by 13? Or a timer / sleep function calling for the function to wait? Question: How can I find out the increment i.e. how do I check, if "i" increases to 13? zero function (zero) {static int i = 0; If (every i seconds) {something} i ++; } Thanks for any help I think Looking for that modulo operation (): zero function (zero) {static int i = 0; Int x = 13 if (i% x == 0) {make something} i ++; }

javascript - jQuery - braces of a POST request -

I got the following code for a jQuery request. I can not understand the braces, is it not closed before it has been done before. Always called the function? var jqxhr = $ .post ("example.php", function () {alert ("success");)). (Function () {warning ("second success";}) .file (function () {alerts ("error")}} .ways (function () {warning ("end");) It has been done, but it returns a jqXHR object, for which you still have the function Can apply, such as:

c# - Index outside of bounds of the array when using DataGrid View? -

I am trying to tie the array directly into grid view control, where I try to display details on grid view control I am doing I have tried the code below, but it is throwing some errors. Please help me to find the right solution Thank you. Code: Secure void ddlCircle_SelectedIndexChanged (Object Sender, EventArgs E) {ShadingAnalysisDataSetTableAdapters.tbl_CadEngineersTeamTableAdapter CD; CD = New Shading AnalysisDataTabAptaptors.blogEditorTemplateAdapter (); Datatable dt = new datatable (); Dt = cd.GetAvailableData (ddlCircle.SelectedValue); Int x, y; Datatelle dt3 = new datatile (); Dt3 = CD. Gettam (); Y = DT3 Ro.kount; X = dt.rows.Count; Datatelle dt2 = new datatile (); Dt2 = cd.GetAssignTeam (x); String [] strArr = new string [dt.Rows.Count]; Int i = 0; Testc: foreach (DataRow r in dt2.Rows) {strarr [i] = r ["Team"]. ToString (); I ++; If (i> = x - 1) {break; } If (i> = y) {Goto testc; }} GridView2.DataSource = strarr [i]; GridView2.DataBind (); }

How to verify if user was deleted or password has changed in AAD in a Windows 8.1 Store app -

I am developing a Windows Store 8.1 application using C # and xaml. When I use the Single Sign-AZURE Active Directory Account Launch <1p> Case 1: I have added some users to the Ezu Active Directory and log in with the app "User X" credentials. When I delete that user X in AD, and I try to open the app again, it is saying that the user is X log, even if the user has been removed in AAD. After 1 hour this user is asking to log in. Rather than pre-login that user X, I want to show the login screen to the user to log in. Case 2: When I change the password of the user X in the Azure Active Directory, then I open the app again, it is not asking the user to log in with a new password. Again, this user is already displaying the logged in user X In both scenarios, I want to show the user's login screen for logging in. How can I get it? Satisfaction, your application "Voting" Ezur Edie to delete user accounts, disable, try to reset password I can

spring - ClassPathXmlApplicationContext created from several config files overrides beans with the same types and different ids -

I have several spring-config XML files that are being used to create a global context: Let me make references like this: private static last string spring CONontext = "global.context"; Private Static Final String BinarF Contact = "Classpath *: Global-Config.exml"; Private configurable applicationsNonnect spring applicationsConsanto; ClassPathXmlServiceLocator () {BeanfishLooccer BeanfertilizerLector = ContextSlatenBinFactorLocator.STASTENS (BinRifConnectx); SpringSpeedSubject = (Configurable App Contexte) BeanFactorLocater. UseBeanFactory (springContext) .getFactory (); } The problem is that bean is defined by the same type in each configuration: some.package.BeanType, but when the context is completely instant then that kind of only A bean is available Classpath XMLApplication Contact is a note in javadoc: In the case of several config places, the definition of Bean is later overridden with defined in previously loaded files Will go. This can b

android - Prevent "ACTION_CHANGE_DEFAULT" from prompting automatically to change default SMS app -

The app prompts you to automatically become the default SMS app when setting the required permissions and intents filter for the default SMS app Is at any point in Is it possible to stop it? I know that there is a method to intentionally call ACTION_CHANGE_DEFAULT to call it at any point and I want to use it to call only a part of my code at a particular time, which I chose. I found that I have this code somewhere inside of my code: intent to intent = new intent (telephony. SMS.intent.action_snnngdlt); Intent.putExtra (Telephony. SMS.Intents.EXTRA_PACKAGE_NAME, context.getPackageName ()); Context.startActivity; This is the first time the trigger is triggered ... It should be used only in that part of the code where we want to clearly trigger it.

php - How to increase the security of user data changes? Is my method safe? -

इस सवाल का पहले से ही एक उत्तर है: < / P> 5 जवाब बस के साथ एक सरल पृष्ठ की तैयारी लॉग ऑन करने की क्षमता सुविधाओं में से एक को पंजीकरण में दिए गए उपयोगकर्ता डेटा को बदलने में सक्षम होना है। मेरा कोड निम्नानुसार काम करता है। लॉग इन करें: अगर (passwordIsCorrect ()) {// $ $ $ _SESSION ['उपयोगकर्ता'] = $ ईमेल में लॉग इन करें; } इसलिए मैं एक सत्र चर पर एक ईमेल या यूजर आईडी लिखूंगा। जब उपयोगकर्ता फ़ॉर्म को पूरा करता है और सबमिट करने पर क्लिक करता है तो मैं डेटाबेस में परिवर्तन लिखता हूं जो तालिका 'प्रयोक्ताओं' में उचित पंक्ति का उपयोग करके $ _SESSION ['उपयोगकर्ता'] का उपयोग करता है; क्या यह एक सुरक्षित तरीका है? इसे किसी तरह से सुधार किया जा सकता है? यह ठीक है, मान लें कि आपके ईमेल को आपके डाटाबेस से साफ या निकाला गया है । $ _SESSION सरणी सर्वर पर संग्रहीत होती है, ग्राहक की मशीन पर नहीं: इसे उपयोगकर्ता के ब्राउज़र सत्र से जुड़े सर्वर पर एक अस्थायी सरणी के रूप में सोचें। ईमेल प्रत्येक अनुरोध के साथ आगे और पीछे नहीं चलाया जाता ह

html - Placing links over an image -

Image
I'm trying to create a navigation bar. There is an image in the background, and I am using text placeholder until I have the link resolved. I can not seem to reveal the text in the navigation bar, rather they insist on appearing in a list style. An example: Gray Gradiented Bar is intended for navigation bar. HTML: & lt; Div id = "pagewrapper" & gt; & Lt; Div id = "container" & gt; & Lt; Div id = "left" & gt; & Lt; / Div & gt; & Lt; Div id = "right" & gt; & Lt; / Div & gt; & Lt; Div id = "center" & gt; & Lt; Div id = "pagebanner" & gt; & Lt; Img src = "img / banner.png" / & gt; & Lt; / Div & gt; & Lt; Div id = "navibar" & gt; & Lt; Img src = "img / navibar.png" & gt; & Lt; Div class = "naviitems" & gt; Home & lt; / Div & gt; & Lt; Div class = "naviitems&

intersect - R: Get all xy-coordinates at the intersection of lines within one SpatialLines(DataFrame) -

I am looking for a way to get xy-coordinates of all intersections within spatlline < / Code> object or spell-lens data frame . I have got the rgeos function of gIntersect , but it only appears at intervals between two datasets since I was working with a dataset of more than half a million lines So, creating a separate file for every line and checking it will take a lot of time to see whether a line sprouts one another with another. There is an intersecting function in ArcMap which is capable of doing it in a few seconds and I was wondering if there was such a function in R. if you assign your spatlines object to psp From spatstat , you can use it in the spatstat function selfcrossing.psp . However, I'm not sure how it will be able to deal with the million lines since the number of crossings, possibly it can be heavier, the code below creates a random segment pattern and finds itself crossing. Keep in mind that this code can potentially take lots of mem

javascript - Google chart disappears when changing page in rails app -

I first worked with Google charts and now I'm using in App Rail, but when I change the page and Return to the chart page Code: application.html.erb: Code> & Lt;% = javascript_include_tag "//www.google.com/jsapi"% & gt; _administrator_navbar.html. ARB: & lt;% = link_to 'caboom', root_path ,: class = & gt; 'Navbar-brand header-title'% & gt; _user.html. ARB: & lt; Script type = "text / javascript" & gt; Google.load ("Visualization", "1", {packages: ["corechart"]}); Google.setOnLoadCallback (drawChart); Function drawChart () {var data = google.visualization.arrayToDataTable ([['Status', 'Quantidad'], ['Paagas', 3], ['Ventidas', 2], ['A Venera', 4]] ); Var PaymentData = google.visualization.arrayToDataTable ([['Label', 'Heroism'], ['Despace', 1000], ['Acquisition', 3000]]); Var chart = new g

c++ - an easier copy-assignment operator implement? -

In C ++ primer 5th, 13.2.1 classes, which act like values, the author creates a class That works like value, it means that each object has its own copy of the resource, which classes manage. The square is down, this is a very simple class, just an indicator for a string, and an integer member member is the only default constructor and copy-control member. HasPtr {public: HasPtr (const std :: string & amp; s = std :: string ()): ps (new std :: string (s)), i (0 } {} Hespant (Constable Hezpretre and P): PS (New Studd :: String (* P.P.)), I (P) {} Hampstrap and Operator = (Constant Hespect and PH); ~ HasPtr () {delete PS; } Private: std :: string * ps; Int i; }; The implementation of the operator given below = given by the book ispaffe and haspatr :: operator = (Constant Hespet & amp; rhs) {auto Newp = new std :: string (* rhs.ps); Delete ps; Ps = newp; I = * rhs.i; Return * This; } This is good, but I think we can use the following implementation that can avoid the

c# - Different behaviour when using a command line script or running it from a backgroundworker -

I have a very strange problem that recurs the strong knowledge of the C #'s background player. I want to run the command line program and check its ERRORLEVEL. Launch the cmd.exe / c echo command & amp; COMMAND_TO_RUN & amp; Echo Insert State: & amp; Amp; Reverse% ERRORLEVEL% & amp; Amp; % Errorlevel% NEQ 0 (echo failure) and (echo success)) When order is unsuccessful, get ERRORLEVEL value -1 This works when I am Cmd. Use this line in the exe. But, here's the problem. When I used to run this as a background worker line, then ERRORLEVEL 0 assume COMMAND_TO_RUN fail Here's my BackgroundWorker code: string [] args = {"echo resonance" in order & amp; amp;;; COMMAND_TO_RUN & amp; connection statut echo: & amp; echo% errorlevel% & amp; if% errorlevel% NEQ 0 (echo failure) and (success corresponds))}; backgroundWorker1.RunWorkerAsync (args); private void BackgroundWorkerl_DoWork (object sender, DoWorkEventArgs e) {st

Advanced hierarchy in PowerPivot -

I am creating a hierarchy in PowerPivot and there is a problem that I want to solve. Hierarchy is 6 levels and see 4 columns of data. The two lowest levels are the order numbers and product groups (on the order number). Issue: While viewing the order number level (level 5), the values ​​should be displayed in full command, even if some product groups are filtering Does anyone know how to solve this? Honestly, this is not a particularly well written question but I think that I know what you are trying to do. Let's say you have a table called 'Sales Data' with the column; Order_Number, Product_Category, Product_Code and Sales The following measures will allow you to slice your data through Product_Category and see sales for all transactions that contain a product in that category: = count ( SM ('Salesdata' [Sales]), ALL ('Salesdata' [ProductCant], 'Salesdata' [Product Code]), Values ​​('Salesdata' [Order_Number])) Effect

Google Analytics Enhanced Ecommerce Questions -

I am trying to implement Enhanced ecommerce tracking with Google Analytics and participate in some queries. Can you send impressions with only pageview events? So how do I send the impressions of items loaded after the initial pageview event? I want to send product impressions on search results pages, which are in blocks of 10. When I try to send with pageview, it never sends, I'm feeling because it's too long for Google, so how do I send it several times at a time? I can reach 6 products and it still works. Should I use only one event to track impressions? Will it call for every product to send and solve the issue of size? Any guidance will be appreciated I think the documentation is a little lacking with some features. You do not need to send an e-comm. Data with pageviews as described here In the "Sending Enhanced Ecommerce Data" section: Note: Ecommerce data can only be sent with an existing hit, for example a pageview or event if you are usi

C#: Map screen absolute to relative screen coordinates in multiple screen environment -

One way to map some absolute coordinates (relative to the main screen) to direct me the coordinates for some screens needed. For example, if you have two screens configured, if the main screen is one of the right, there are some valid negative coordinates that point to the left screen. Edit: The goal is to know whether some full coordinates are valid on some available screens thanks div class = "post-text" itemprop = "text"> This should be done for any screen configuration: Fixed point GetRelativeCoordinates (points Absolute coordinator) {var screen = Screen.FromPoint (absoluteCoordinates); New point (absolute corridines .x - return to the screens. Bounds complete, absolute coordinates. Y - screen. Bounce top); } property top and left store the full coordinate corner of the screen (< Code> [0, 0] at the top, on the left side of the primary screen) It is very easy to change the full coordinate to the relative, no matter how many

Powershell script to update Java to latest version -

We have an application which is Java dependent that we are working on SCCM installer to exclude customers. Due to updates to Java, almost monthly (and up to 30 days old updates are available), we are exploring a way to stay up to date with the latest Java version of the SCCM installer. We have the ability to run PowerShell scripts from the SCCM installer, but we have not found any way to write a script that will automatically download and install the latest Java version. Do anyone know that this is possible, and how can we go about it? Thank you in advance! You might use the available links on this page for download: P> Alternatively, you can download once and share a file so that you can use simple methods to copy the file from the UNC. Like Path \\ fileserver \ folder \ installerpackage.exe Just be prepared for headache. In addition to extracting and upgrading Java on dozens of machines, I can tell you that it is not always a clean install / reinstallation u

ruby on rails - undefined method `[]' for nil:NilClass in nested form using check_box_tag to create associated records -

I get this error when I try to add nested attributes via the check box: Undefined method `[] 'for zero: NilClass The error is in the controller on this line:" @food_rule = @ meal.food_rules.build (parameter [: Food_rule] [: restriction_ID]) " my model uses I_many class food < ActiveRecord :: Base is has_many: food_rules, dependent: deleted has_many: restrictions ,: through = & gt; : Food_rules, accepts_nested_attributes_for: food_rules, allow_destroy: True End Square FoodRule & lt; ActiveRecord :: Base is_to: Food belongs_to: Restriction end class restriction & lt; ActiveRecord :: Base is_mount: Food_Strol, Dependent :: has has_many: Diet, via = & gt; : Food_rules, accepts_nested_attributes_for: food_rules, allow_destroy: true end This is my MealsController my "add_restrictions" method that says one: record meal_restrictions via check box def add_restrictions @diet = restriction.k1.order (: name) @meal = Meal.find (paramet

Javascript shuffle function returns same value in for loop -

Why do I get three arrays in the same order while I recite them in a shuffle ceremony in the loop? var items = ['x', 'y', 'z', 'a', 'b']; Var createSlots = function (slots) {slots = slots || 3; Var slot rack = []; (Var i = 0; i & lt; slot; i ++) {slotRack.push (shuffle (item)); } Return slot rack; } Function for shuffle (o) {// v1.0 (var j, x, i = o.length; i; j = math.flur (monastery.rendum) * i), x = o [- i] , O [ii] = o [ja], o [j] = x); Return O; }; Var SlotMatchin = Create Slot (); // Returns the three array with values ​​in the same order ... do not want to ... :( console.log); = "Post-Text" itemprop = "text"> squint mentioned your problem in a comment given above. Anyway, This is a cooler shuffle method that will always get you out of trouble: function shuffle (ARR) {return arr.sort (function () {return Math.random () - Math.random ( }})}} edit (thanks to Mr. Use ): ( Christoph for imple

enterprise architect - How to get types of an attribute in an interface c# -

Working with an Add-in for Enterprise Architect (EA) I need to get all the different types of methods of a test in E. I << By this, I mean that the EA namespace receives the test class from an IDualTest interface, in which there is a set / set method for the string attribute named "type". There are 3 different types in the form of a standard EA (standard, regression, load), but it is possible to add all my own types I need all these types of. I believe that this is possible with reflection, but this is not my strongest site, so I can actually use some help here. If more information is required, please comment. Edit: I got the following code: list & lt; String & gt; TypeList = new list & lt; String & gt; (); Foreign language (type the tape in the test type) {typeList.Add (type); } The code above is not compiled but I hope it shows my needs. foreach (test t in elm test) {string type = t. Type; // This is a type that can be standard to EA an

c# - EF complex class getting me null -

I have a class like this. public class user {public id id}; Set; } Public string first name {receives; Set; } Public String LastName {get; Set; } Public String Email {get; Set; } Public IList & lt; Role & gt; Roles (get; set;} public virtual branch branch {received; set;} public string password {get} set;}} public square branch {public entry id (get; set;} public string name {get; set; } Public string location {get} set;} Public virtual area area {get; set;}} The problem I have is that when I store the layer layer the property for the branch property In use The passer-by appears in the null. I have verified that before it reaches the repository, it is not empty. I seem to have something in sequence, but know i'dont correct it < P> Thanks in advance This way the store gets the objects:! Public read-only IDbSet DbSet; Public IEnumerable & lt; T & gt; (; & lt; t, bool & gt; & gt; expression & lt; expression of the string; string s

vb.net - Remove last character from textbox on button click -

मेरे पास एक textbox , textbox1 है, जिसका readOnly संपत्ति सही पर सेट है यह एक ऑन-स्क्रीन कीबोर्ड की तरह है। जब उपयोगकर्ता एक बटन दबाता है, तो मैं इस का उपयोग करके वर्ण जोड़ सकता हूँ: Textbox1.Text = Textbox1.Text & amp; एक लेकिन, जब उपयोगकर्ता पाठ को हटाना चाहता है, जो कि बैकस्पेस की तरह बिल्कुल काम करना चाहिए, अंतिम वर्ण को से हटा दिया जाना चाहिए टेक्स्ट बॉक्स । मैं सामान्य टेक्स्टबॉक्स को छोड़ने के लिए तैयार हूं और richtextbox का उपयोग कर रहा हूं, अगर अमीर के साथ कोई रास्ता नहीं है। / P> कैसे एक बटन के साथ एक पाठ बॉक्स के अंतिम चरित्र को निकालें? पहले सुझाया गया सबस्ट्रिंग विधि है जो मैं भी पोस्ट कर सकता था। हालांकि, वहाँ एक विकल्प है दी गई इंडेक्स के बाद प्रत्येक अक्षर को हटाकर निकालें विधि काम करती है। उदाहरण के लिए: TextBox1.Text = Textbox1.Text.Remove (Textbox1.Text.Length - 1)

R package for geographic regions -

Image
Someone told me about an R package with the definition of the objects of the borders of some regions and countries. What is the name of the package I am trying to find an Italian area, the limit of Veneto? Do you know an alternate way to find that range (I'm not sure that Veneto has been included in the package) ?? required (getData ('GADM' Country = 'ITA', Level = 1), NAME_1 == "Veneto") Plot (Veneto)

opengl - glReadPixels: Stack around variable was corrupted after read pixels -

Here's the code I'm trying to use glReadPixels () to read the window of 5 * 5 pixels. Infected unsigned int WINDOW_SIZE = 5; Const unsigned int NB_COMPONENTS = 3; GLubyte array [NB_COMPONENTS * WINDOW_SIZE * WINDOW_SIZE]; GlReadPixels (0, 0, WINDOW_SIZE, WINDOW_SIZE, GL_RGB, GL_UNSIGNED_BYTE, array); So far the code causes the following error in the visual studio: "The pile got corrupted around the variable array" If I fix it 4. does anybody know? Make sure that you are using GL_RGB

c# - Obtain expiration date / details about a WCF ssl certificate from .net client -

From my .NET client code, to get information about the SSL certificate used by the WCF service The way? Assuming that I can successfully connect to the SSL service beforehand. I am hoping to report the end date of server certificate on the dashboard. If the certificate has been updated / renewed, the last time the customer was in contact with the service, then I am also trying to find out in that form. We believe that the server certificate is also the real public proof godaddy etc. i.e., the proof was not already imported into the client store. Any thoughts? I was thinking that I could get anywhere in the system. Servicemodel. Clientbyge that I could get after opening a connection, but nothing got so far. Thank you! The easiest way is to simply apply a certificate verification callback to the customer so that you are provided by the server Could get a chance to see the SSL certificate Before being trusted with the client:

java - Mapbox and GWT integration -

मैं मैडोबेक्स जावास्क्रिप्ट लाइब्रेरी जीडब्ल्यूटी (Google वेब टूलकिट) के साथ काम करने की कोशिश कर रहा हूं। नीचे कोड का एक स्निपेट है जिसका उपयोग मैं कर रहा हूं: क्षैतिज पॅनल क्षैतिज पॅनेल = नया क्षैतिज पॅनेल (); horizontalPanel.setHeight ( "400px"); horizontalPanel.setWidth ( "600px"); horizontalPanel.getElement () setId ( "भू-नक्शा")।; ScriptInjector.fromUrl ("https://api.tiles.mapbox.com/mapbox.js/v2.1.4/mapbox.js") .setCallback (नया कॉलबैक & lt; शून्य, अपवाद & gt; () {@Override सार्वजनिक शून्य पर विफलता (अपवाद कारण) {} सफलता पर सार्वजनिक शून्य को ओवरराइड करें (शून्य परिणाम) {ScriptInjector.fromString ("$ wnd। $ (दस्तावेज़) .ready (function () {" + "console.log (\" ठीक है, यह मैं है! \ ") ; "+" एल.एमएपीबॉक्स.एसेसटोकन = \ "कुछ ऐस टोकन \"; "+" var मैप = एल.मैपबॉक्स.मैप (\ "भू-मानचित्र \", \ "geo-map-id \")। सेट करेंव्यू (+ [40, -74.50], 9); "+" c

javascript - Geocoding with Google Maps without OVER_QUERY_LIMIT errors - Trying with PHP-Solution -

I hope that you can actually help I try to stop Google Map-AP-error "OVER_QUERY_LIMIT" I want to solve it with PHP rather than using Javascript and playing with timeout etc. For this I have changed this line: geocoder.geocode ({'address': address}, function (result, status) { this With the script: var url_addr = encodeurIComponent (address); $ .getJSON ('geocode.php?) Also I have a PHP-script to get the Geocode-coordinates: / P> $ params = "address =". Urlencode ($ _GET {'addr'}); $ url = 'http: //maps.googleapis. Com / maps / api / geocode / json? Sensor = false & amp; '. $ Params; $ json = file_get_contents ($ url); $ status = json_decode ($ json) -> status; // more Over_query_limit status for $ ($ string (= '' / 'Jason' Json; echo; After running it I can see the named PHP-script in the debugger console with an attachment like /geocode.php?addr=432345 ... Next to my JS-scripts I want to c

javascript - PHP closure functions: why does a closure have to be an anonymous function? -

A lambda or anonymous function is a function without only one name. Example $ lambda = function ($ a, $ b) {echo $ a + $ b; }; A closing is a function whose variable parameters are not specified in the list. PHP 5.3+ These variables are used after the keyword and from that time the definition of the function of the link function has been performed by the value or context. For example $ foo = 'hello'; Use $ Close = function () ($ Foo) {echo $ foo; }; $ Off (); In Javascript, all functions are closed in the sense that when the functions are nested then there is a radius series, for example 1 can be used in the internal function. Its local variables, 2. It is known as its closure scope, local variables of the function in its closing scope, 3. Local variables of closing scope of closing scope, known as the scope of closing of the scope of closing Goes ..., and so on until we can not even use it. Global variables which are defined in most scope, the variables declar

c++11 - Which headers in the C++ standard library are guaranteed to include another header? -

The C ++ standard library headers can include each other in an unspeakable manner, so the programmer usually has the second heading Should not be dependent on. In some cases, however, a header is guaranteed to include another header, or provide some tasks that are necessary for the addition of other headers. What are those cases? This answer does not take into account C header - both & lt; Meow.h & gt; and and lt; Cmeow & gt; From the C ++ Library Header with (for all references N465 9): Initiator_list & gt; Guaranteed by: & lt; Utility & gt; (§23.2.1) & lt; String & gt; (§24.3.1) (§ 26.3.2) & lt ; Deque & gt; (§ 26.3.3) & lt; Forward_list & gt; (§ 26.3.4) & lt; List & gt; (§ 26.3.5) & lt; Vector & gt; (§ 26.3.6) & lt; Map & gt; (§ 26.4.2) & lt; Set & gt; (§ 26.4.3) & lt; Unordered_map> (§ 26.5.2) & lt; Unordered_set & gt; (§ 26.

matlab - How to smoothen a jagged border of an image into a straight line? -

Image
मेरे पास इस तरह की छवि है (थ्रेसहोल्डिंग, शोर हटाने, आदि।): मेरा अंतिम आउटपुट बिना किसी दांतेदार किनारों के एक चित्र होना चाहिए, और इससे छोटा दी गई छवि इस से, मेरा मतलब है कि 2 छवियों के बीच का एकमात्र अंतर होना चाहिए कि नए में, दांतेदार किनारों को हटाया जाना होना चाहिए, और दांतेदार किनारों भर में । इसी तरह (अंतिम छवि को लाल सीमा के भीतर होना चाहिए, लाल बॉर्डर केवल स्पष्टीकरण के लिए दिखाया गया है): मैं कुछ हड्डियों के रूपांतरण की ज़रूरतों के बारे में सोच रहा था या फिर ड्रिलिंग का इस्तेमाल किया था और फिर इरोशन, लेकिन कुछ भी काम नहीं कर रहा था ( शायद मेरी गलती है, क्योंकि मैंने पहले से उनके साथ बहुत अधिक विस्तार से काम नहीं किया है)। ध्यान दें कि मैं ऐसा भाषा चाहता हूँ जिसमें MATLAB है। 2 प्राथमिक उद्देश्य यह है: होग ट्रांससेट्स का उपयोग करके किनारों को स्वयं प्राप्त करने के लिए जिससे कि 'एक्स्ट्रामा' संपत्ति वांछित पिनट देता है, जैसे कि क्षेत्रप्रोपों का उपयोग करते हुए, जैसे: < / Li> सवाल, एक अधिक संक्षिप्त रूप में: मैं MATLAB में इस टी को

javascript - Share button on my web application -

I want to add a button to share a picture. This tag is in my tag body: & lt; Div id = "fb-root" & gt; & Lt; / Div & gt; & Lt; Script & gt; (Function (D, S, ID) {var js, fjs = d.getElementsByTagName (s) [0]; if (d.getElementById (id)) returns; js = d.cent element (s); js .id = Id; js.src = "//connect.facebook.net/it_IT/sdk.js#xfbml=1&version=v2.0"; fjs.parentNode.insertBefore (JS, FJS);} (document, 'script' , 'Facebook-jssdk')); & Lt; / Script & gt; & Lt; Div class = "fb-share-button" data-href = "my_image" & gt; & Lt; / Div & gt; Do not work when I run my page, it shows an error: Get the file: //connect.facebook.net/it_IT/sdk Js net :: ERR_FILE_NOT_FOUND Although I want to share without ID_APP! Since you are testing it locally by using a file path, "file:" "Script:" file: //connect.facebook.net "If you change the URL to use" http: &

Exchange ActiveSync support for Gmail in Android Lollipop -

Google has stopped supporting Exchange ActiveSync for Gmail shortly before with the exception of Google Apps for Business. However, one of the Android Forum says that Gmail will support Exchange 5.0. Does this mean that Android is with Lollipop, Google has started using Exchange Exchange Sync for Gmail again? The Android Lollipop documentation does not mention about this. Support of the Gmail 5.0 exchange supports the Android Gmail App Exchange ActiveSync (EAS), the GML service Does not support EAS.

c++ - Reading in an R list for a constructor throws error: expecting a single value -

I'm compiling a package with Rcpp / RcppArmadillo and I'm getting an error that I believe is Rcpp as The header is from .h I have written a constructor who takes the list from R and makes the appropriate class. The function calling the constructor and the actual constructor is shown below. I am trying to follow the code shown here on the lists and data frames. #include "varInf.h" // [[RCPP: Dependent (RCPARMDRLO)] [/ / [RCPP :: Exports]] zero varInfInput (Rcpp :: list model_r) {mm_model Model = mm_model (model_r); VarInfC (model); } This creator is mm_model.h which is included in varInf.h using namespace RCPP; Using Namespace ARMA; Class mm_model {public: int T; Int J; Round counter RJ; Int maxr; Integer Vector Notice; Int maxN; Int kashmir; Integer vector power; Int maxV; Numerical vector alpha; Numerical vector theta; Integer z; Numerical vector lambda; NumericVector phi; NumericWitch delta; Numeric vector ob; Int Dish; Mm_model (catalog model) {t = (in