query_id
stringlengths
4
64
query_authorID
stringlengths
6
40
query_text
stringlengths
66
72.1k
candidate_id
stringlengths
5
64
candidate_authorID
stringlengths
6
40
candidate_text
stringlengths
9
101k
21d96d16a56713b950d55dc6d5aa48c6a16b683bf39402f37657baeb95257f68
['d79d90033df2437eb38439d98097c1cd']
I've just started at a new position, but have an interview for another job coming up. I realize that people often recommend claiming a doctor's appointment in order to attend an interview, but I'm in a situation where it seems like being honest might be preferable, I'm just wondering how the various factors should weigh into my decision. My current position is a short term contract for 3 months, so they presumably expect me to be looking for a new position, if not quite this early I applied for both positions around the same time, but one was a position in a government department and the wheels of bureaucracy turn slowly. I didn't seek out this position while at my current job. I'm employed on a casual basis, so only get paid for each hour worked, no paid sick leave (I'm in Australia so this is not as standard as it may be elsewhere) Does the context override the usual rule of not letting your employer know you're looking for work elsewhere? Or should I go with the typical excuse of a doctor's appointment?
ecdca77cb0a3bf80b75d3dc8c329d76e2c9d78637f88aaffa759cc28dc8c3ec8
['d79d90033df2437eb38439d98097c1cd']
In these two sentences, I would've thought に would be used in place, but instead を is used? When is it appropriate to use either? A: 反対側【はんたいがわ】50メートルあたりを探【さが】して! Search around 50 metres on the opposite side! B: もし会【あ】ったらグレースをどうするつもりですか? What are you planning to do to <PERSON> if we see her? Shouldn't に be used in both of these to indicate the direction?
5ec89b85fc8c472c27e8bb53be6e2d53a94227544fa3c9490da7c8dee93e079b
['d7a2ae33c1164ba1976d2c58f99930aa']
I have troubles making this code functionnal, i am pretty new to coding and learn everyday, so sorry if this question looks stupid. Here's where I am so far : a1 is a drag and drop object a2 is an area, which when a1 is dropped on it, add the value 5 on a textfield a3 is an area, which when a1 is dropped on it, substract the value 5 on a textfield a1 start in the a3 area, when I drag a1 to a2, it shows 5, if I drag back to a3, it shows 0, so it's working as intended Now what I struggle with : a code that don't add 5 if I move a1 to a2, when a1 is ALREADY on a2. a code that don't substract 5 if I move a1 to a3, when a1 is ALREADY on a3. here's my code : var myTextBox:TextField = new TextField(); var myTextBox2:TextField = new TextField(); addChild(myTextBox2); myTextBox2.width = 200; myTextBox2.height = 100; myTextBox2.x = 100; myTextBox2.y = 20; a1.addEventListener(MouseEvent.MOUSE_DOWN, drag); stage.addEventListener(MouseEvent.MOUSE_UP, drop); function drag(e:MouseEvent):void { e.target.startDrag(); } function drop(e:MouseEvent):void { stopDrag(); if (a1.hitTestObject(a2)) { myTextBox.text = "5"; var r:String=String(uint(myTextBox.text)+uint(myTextBox2.text)); myTextBox2.text=r; } if (a1.hitTestObject(a3)) { myTextBox.text = "5"; var r2:String=String(uint(myTextBox2.text)-uint(myTextBox.text)); myTextBox2.text=r2; } else { trace("No collision."); } } I don't think it's too complicated, but I don't have the knowledge yet to make it work, any assistance would be greatly appreciated ! thanks!
d959f552c5d0dad8de1fda58426fdfaab433996b689808d85247ac141b9a246b
['d7a2ae33c1164ba1976d2c58f99930aa']
Ok, found out a way, so posting the code in case someone need it, or if someone has a better code, always wanting to learn ! thanks ! Added a movable object named a4 to test on multiple drag and drop objects var myTextBox:TextField = new TextField(); var myTextBox2:TextField = new TextField(); var myTextBox3:TextField = new TextField(); addChild(myTextBox2); myTextBox2.width = 200; myTextBox2.height = 100; myTextBox2.x = 100; myTextBox2.y = 20; a1.addEventListener(MouseEvent.MOUSE_DOWN, drag); a1.addEventListener(MouseEvent.MOUSE_UP, drop); a4.addEventListener(MouseEvent.MOUSE_DOWN, drag); a4.addEventListener(MouseEvent.MOUSE_UP, drop); function drag(e:MouseEvent):void { if (e.target.hitTestObject(a2)) { e.target.startDrag(); myTextBox.text = "0"; myTextBox3.text = "5"; } if (e.target.hitTestObject(a3)) { e.target.startDrag(); myTextBox.text = "5"; myTextBox3.text = "0"; } } function drop(e:MouseEvent):void { stopDrag(); if (e.target.hitTestObject(a2)) { var r:String=String(uint(myTextBox.text)+uint(myTextBox2.text)); myTextBox2.text=r; } if (e.target.hitTestObject(a3)) { var r2:String=String(uint(myTextBox2.text)-uint(myTextBox3.text)); myTextBox2.text=r2; } }
6f40c42cefa6bc4fd8c8c252501e6be09d6e10dfc6dfaf580b056e346dc4debe
['d7adc50d6216442eb10952e26fe76f02']
From https://graphql.org/ GraphQL APIs are organized in terms of types and fields, not endpoints. Access the full capabilities of your data from a single endpoint. Hence, creating two endpoints as you have suggested would go against that principle. You probably shouldn't do it, but most importantly, there's no need to. Suppose you have a type ProductType with a couple of fields. You can use that same type to both query/display the product data in your website and edit it with a mutation in the admin page. Granted, you may have to deal with authorizing some specific queries and mutations, but it shouldn't be any harder than dealing with authorization in REST. See more about GraphQL authorization in Ruby.
b4c50abfb4c72da674cd4d2b7359b7426beac03e23274ec0986a2644dcd225f4
['d7adc50d6216442eb10952e26fe76f02']
Yes, you just have to make your arguments optional. The exclamation mark at String! requires the argument to be a string and not null. Hence, by removing it you could write your single query as const getAllStops = gql` query trafficStops($after: String, $before: String) { trafficStops(after: $after, before: $before) { id date } } `
c288bd18b6125cc6c3f22c7bd4567b094726526ba318478337e3e905d5121c2d
['d7c80267a8404f65a9696b04e5c47d66']
I have a Coordinator layout in activity xml and an include layout that have a content layout xml. Like this: <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" android:id="@+id/main"> <android.support.v4.widget.NestedScrollView android:layout_width="match_parent" android:layout_height="wrap_content"> <include layout="@layout/content_sign_in" /> </android.support.v4.widget.NestedScrollView> When i put my content layout inside a nestedscrollview my content layout double your heigth. Anyone can help me? My Content layout xml: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/content_sign_in" android:layout_width="match_parent" android:background="@drawable/sign_up_bg" android:layout_height="match_parent" tools:showIn="@layout/activity_sign_in"> <ImageButton android:id="@+id/arrow_back" android:layout_marginTop="15dp" android:layout_marginLeft="10dp" android:scaleType="centerInside" android:padding="5dp" android:src="@drawable/ic_back_white" android:background="@android:color/transparent" android:layout_width="40dp" android:layout_height="40dp" /> <ImageView android:scaleType="centerInside" android:layout_below="@+id/arrow_back" android:id="@+id/logo" android:layout_marginTop="6dp" android:layout_centerHorizontal="true" android:layout_width="78dp" android:layout_height="45dp" /> <android.support.design.widget.TextInputLayout android:textColorHint="@color/color_80ffffff" android:id="@+id/input_layout_email" android:layout_marginLeft="46dp" android:hint=" " android:layout_marginRight="46dp" android:layout_marginTop="74dp" android:layout_below="@+id/logo" app:errorTextAppearance="@style/error_appearance" android:layout_width="match_parent" android:layout_height="wrap_content"> <android.support.v7.widget.AppCompatEditText android:id="@+id/work_email" android:gravity="center" android:theme="@style/EditTextLogin" android:textColorHint="@color/color_80ffffff" android:hint="@string/hint_work_email" android:textColor="@android:color/white" android:textSize="14sp" android:inputType="textEmailAddress" android:imeOptions="actionNext" android:layout_width="match_parent" android:layout_height="wrap_content" /> </android.support.design.widget.TextInputLayout> <android.support.design.widget.TextInputLayout android:textColorHint="@color/color_80ffffff" android:id="@+id/input_layout_password" android:layout_marginLeft="46dp" android:hint=" " android:theme="@style/EditTextLogin" android:layout_marginRight="46dp" android:layout_below="@+id/input_layout_email" app:errorTextAppearance="@style/error_appearance" android:layout_width="match_parent" android:layout_height="wrap_content"> <android.support.v7.widget.AppCompatEditText android:id="@+id/password" android:gravity="center" android:textColorHint="@color/color_80ffffff" android:hint="@string/hint_password" android:textColor="@android:color/white" android:textSize="14sp" android:inputType="textPassword" android:imeOptions="actionDone" android:layout_width="match_parent" android:layout_height="wrap_content" /> </android.support.design.widget.TextInputLayout> <Button android:layout_below="@+id/input_layout_password" android:id="@+id/btn_sign_in" android:textColor="@android:color/white" android:text="@string/btn_login" android:layout_marginTop="26dp" android:background="@color/colorAccent" android:layout_marginRight="60dp" android:layout_marginLeft="60dp" android:layout_width="match_parent" android:layout_height="40dp" /> <RelativeLayout android:layout_marginTop="17dp" android:layout_below="@+id/btn_sign_in" android:gravity="center" android:layout_width="match_parent" android:layout_height="wrap_content"> <TextView android:id="@+id/label_sign_up" android:textSize="14sp" android:text="@string/lbl_sign_up" android:textColor="@color/color_80ffffff" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <TextView android:layout_toRightOf="@+id/label_sign_up" android:textStyle="bold" android:layout_marginLeft="5dp" android:id="@+id/btn_sign_up" android:textSize="14sp" android:text="@string/txt_sign_up" android:textColor="@android:color/white" android:layout_width="wrap_content" android:layout_height="wrap_content" /> </RelativeLayout> <TextView android:id="@+id/forgot_password" android:textColor="@color/color_80ffffff" android:textSize="14sp" android:gravity="center" android:text="@string/text_forgot_password" android:layout_marginBottom="20dp" android:layout_alignParentBottom="true" android:layout_width="match_parent" android:layout_height="wrap_content" /> <RelativeLayout android:visibility="gone" android:id="@+id/layout_resend" android:layout_alignParentBottom="true" android:layout_width="match_parent" android:layout_height="86dp"> <ImageView android:scaleType="fitXY" android:src="@drawable/pink_bar" android:layout_width="match_parent" android:layout_height="86dp" /> <Button android:id="@+id/btn_resend" android:layout_marginRight="10dp" android:layout_alignParentRight="true" android:layout_marginTop="26dp" android:textSize="14sp" android:text="@string/txt_resend" android:textColor="@color/color_505065" android:background="@android:color/transparent" android:layout_width="wrap_content" android:layout_height="40dp" /> <ImageView android:id="@+id/ic_email" android:layout_marginLeft="16dp" android:layout_marginTop="26dp" android:src="@drawable/ic_email_confirmation_white" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <TextView android:layout_marginLeft="15dp" android:layout_toRightOf="@+id/ic_email" android:layout_toLeftOf="@+id/btn_resend" android:layout_marginTop="26dp" android:textSize="14sp" android:text="@string/text_resend_email" android:textColor="@android:color/white" android:layout_width="match_parent" android:layout_height="wrap_content" /> </RelativeLayout> <RelativeLayout android:visibility="gone" android:id="@+id/load" android:background="#aa000000" android:layout_width="match_parent" android:layout_height="match_parent"> <ProgressBar android:layout_centerVertical="true" android:layout_centerHorizontal="true" android:layout_width="50dp" android:layout_height="50dp" /> </RelativeLayout> i don't know why this happen
5536ffa0609b039e10fa847f7eea1c63ea95816bb4b6fbc3c37029ecd7bc69c6
['d7c80267a8404f65a9696b04e5c47d66']
Your Java code will be like this: import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.TextView; import java.util.Random; public class MainActivity extends AppCompatActivity { private String jokes[] = {"text1","text2","text3","text4"}; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); final TextView joke = (TextView) findViewById(R.id.textViewJoke); Button sort = (Button) findViewById(R.id.buttonSort); sort.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Random random = new Random(); int value = Math.abs(random.nextInt() % jokes.length); joke.setText(jokes[value]); } }); } } And your xml code will be like this: <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity"> <TextView android:id="@+id/textViewJoke" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="8dp" android:text="Hello World!" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent"/> <Button android:id="@+id/buttonSort" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="8dp" android:layout_marginLeft="8dp" android:layout_marginTop="8dp" android:layout_marginEnd="8dp" android:layout_marginRight="8dp" android:layout_marginBottom="8dp" android:text="Button" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/textViewJoke"/> </android.support.constraint.ConstraintLayout> For what you intend to do.
be6fc8aa5cb8021560d0089e6b6455de8079c7798a7985490450c24851aa9f0a
['d7e9e6646b724b9bb104f64343f75391']
I created appEngine project from the Maven glass java starter project, and I am trying to run it as appengine:devserver But, when I try to access the localhost on the browser, it says:- "This webpage has a redirect loop". Also, how do I delete the cache on the chrome browser, because even when the localserver is not running, I still get the above mentioned error, unless I delete the cache from the browser and restart my Windows m/c.
6e0efb483cca450a3324a5216c2801e250ce3da2f844dcf388c3f6286e255aef
['d7e9e6646b724b9bb104f64343f75391']
Deletion of contacts can happen by your Glassware only if those contacts were inserted into your Glass by the same Glassware. I have tried this DeleteAllContacts code, that works pretty well. NewUserBootstrapper.deleteAllContacts(MirrorClient.getMirror(credential), credential); and this is the method. private static void deleteAllContacts(Mirror service, Credential credential) { try { ContactsListResponse contacts = service.contacts().list().execute(); for (Contact contact : contacts.getItems()) { LOG.info("Contact ID: " + contact.getId()); LOG.info(" > displayName: " + contact.getDisplayName()); if (contact.getImageUrls() != null) { for (String imageUrl : contact.getImageUrls()) { LOG.info(" > imageUrl: " + imageUrl); } } MirrorClient.deleteContact(credential, contact.getId()); } }catch (IOException ioe) { LOG.warning("An error occurred: " + ioe.getMessage()); } }
68b90e2907f71202060226acc4b4948d9970cc857c31ac1a8635af20493d2c56
['d7faf1b9a22841128b9489a8503a3d27']
From the url: http://www.datastax.com/dev/blog/virtual-nodes-in-cassandra-1-2, they say: "If instead we have randomized vnodes spread throughout the entire cluster, we still need to transfer the same amount of data, but now it’s in a greater number of much smaller ranges distributed on all machines in the cluster. This allows us to rebuild the node faster than our single token per node scheme." Itseems that the above sentence convey, when we replace a dead node with a new node with same num_tokens (say num_tokens:4), then replaced node contain the same token value as the dead node had before releasing those token values. But Vnodes generates random token values for every node, then how is it possible to replace a node with same Vnodes token value? The URL seems confusing in explaining the concept of replacing a dead node with new node using the concept of VNODES. It would be nice if someone can clarify how a Vnode is used for replacing the dead node with exact token value ranges. Thanks in advance.
8fd372d255d44e86cb517fdaee20d3277f88bc90a97f3e63b5fd0f54d46c9a4d
['d7faf1b9a22841128b9489a8503a3d27']
By configuring: 1. offsets.topic.num.partitions : The number of partitions for offset to commit the topic. & 2. offsets.topic.replication.factor: replication factor for the offset topic" in server.properties file, we are going to have Offset manager with one broker acting as leader and rest as followers and hence it follows the same leader failure mechanism in kafka. Hence, when the offset manager that handles commitment of offset is down, Broker Controller eventually elects one of the ISR as the next offset manager Leader.
320b608fc812b2c77ef82998bdd02723ed91578b99bbb15cc358f52dba866694
['d7fcdae5a62c4175ab638b4ef04b1b59']
I understand if something is done behind you, it is already unknown to you. Your back has no eyes and therefore one cannot see what's done at their back. I am driving towards the use of "behind my back". it sounds like the opposite. for instance, if someone says the pen is "behind the back" of the book, the person may literally mean the pen in front of the book.
b0108fda10cd3ba761212e6536ae24adc3693e3b2ec342e89dce021f6b672a40
['d7fcdae5a62c4175ab638b4ef04b1b59']
Yes, I see now. The cardinality of that is R. We cannot inject the powerset of R into the sections. However - must I show that every subset, if we assume it to be affiliated with a section, is only affiliated with ONE ordered pair? I can see that if two subsets belong to the same section, they are the same. But must I necessarily show that every set is at most one section
fc85982d4042c74a75bbb0f30309cfffb83fdd98a9dcd24b1377e0da8046f312
['d8036e475b374c46801048227d3644a5']
I have used XmlDocument instead of XmlSerialzier public static String ToXmlString(this Object xmlObj) { var objectType = xmlObj.GetType(); var document = new XmlDocument(); document.LoadXml(xml: xmlObj.ToString()); StringBuilder xmldata = new StringBuilder(); var ele = (XmlElement)document.FirstChild; foreach(var item in document) { xmldata.Append(item); } Console.WriteLine(ele.InnerXml); return xmldata.ToString(); }
32cab05c5d275d8e345b95972ce22489cd255f56c3b515c1f9e6d66facb91ca6
['d8036e475b374c46801048227d3644a5']
As per your question, I assume you have 2 sites running (1_Default web site, 2_Site1.com) on your IIS. Suggest solution : Try to stop your default website and load site1.com in your browser. Go to site1.com > Right click go to Edit Bindings and set the port number to be 80. try going to site1.com. Cheers
becd091b79ed8144c7a509faff8af7c426773b0966282848f07d9f71491334c8
['d826bba8c29c49359362e45dd09fd055']
This is going to be tricky to implement entirely in Fluent using Entity. Firstly, you will need to use raw SQL to get your bCount. Secondly, you will need to change your init(node:) to accept bCount, though it shouldn't be in your makeNode() because we don't want to create a stored database field for it. Try this for your raw SQL (untested): SELECT A.*, ( SELECT COUNT(*) FROM B WHERE B.aID = A.id ) AS bCount FROM A ORDER BY bCount Then, run that query to get your A models. var models: [A] = [] if let driver = drop.database?.driver as? PostgreSQLDriver { if case .array(let array) = try driver.raw(sql) { for result in array { do { var model = try A(node: result) models.append(model) } } } } As I said before, your init method on A will be receiving bCount so you will need to store it there.
dda8578bf7fdf58117009f82cbc6e27316fe3f0cab3d264baae8293c319fee9e
['d826bba8c29c49359362e45dd09fd055']
Vapor runs server-side. This means it won’t know, by itself, which option is selected by the client at the time the template is rendered. By the time the user can see the page and interact with it, Vapor is no longer involved. This means you have two choices. Either use client-side programming (i.e. JavaScript, or one of its many frameworks) to show the correct template when the user selects it, or, make the action of the client selecting an option force a reload from the Vapor server which will now know what template to produce. JavaScript option: You will either include HTML code for all options in the generated HTML, with something like display: none set for each of them, and a listener on the select box which dynamically shows and hides content as appropriate; or, use something like Vue.js to handle templating for you, potentially even bypassing Leaf entirely. Server-side option: You should listen on the select box. The act of the user choosing an option should cause the window to navigate to something like /report/?option=wire. Vapor should look out for the GET variable called option, and if present, render the appropriate template section. (Hybrid option, for completeness: when the user chooses an option, the JS sends a request to Vapor for only the content section and inserts it into the document.)
ff0c19a8bf5caa108abc6c1770945a997fd33351a2c3a506b5456c70edf943ab
['d8355d6e851d44d08431e0b25768c42e']
It's for a personal project that I'm working on; I like look of spelled-out page numbers, but I'd only like to do this for certain numbers. I thought this would be a pretty simple tweak to my document but I've been trying to figure this out for a few hours to no avail.
03cbad2f667333646741e31b8262f32f1efd7ca1b504b667f4ac686ace85f9f7
['d8355d6e851d44d08431e0b25768c42e']
I would experiment with a tool like AutoIt, maybe create a program that copies itself to your temp location and runs it. Maybe have it set a "Run" key to run that file from the temp location on user login, maybe change proxy settings, etc.. At least you'll have an exe, that is unsigned that is trying to make system changes to launch itself from an unusual location to run a binary from. I suspect it's more these sort of operations you're after when testing behavioural detection.
c01f1e1c931b34369ee54eaccfb0ff11c40e8d2cb03036e59b88d2dd54ae9a93
['d8374cce2efd4d17b1c80e40e2cf2dd1']
I have 5 spinners in my layout. Each one is dependent on the previous spinner(s). Due to the limit of OnItemSelectedListener, the current value that is displayed in the spinner cannot be selected. I am wanting to be able to select a value on my spinner, even if it is already selected/shown. Here is the cursor for one of my spinners and the XML of one of the spinners: vType = (Cursor) DataBaseHelper.getPowersportsType(); startManagingCursor(vType); SimpleCursorAdapter powType = new SimpleCursorAdapter(this, android.R.layout.simple_spinner_item, vType, new String [] {DataBaseHelper.POWERSPORTS_TYPE}, new int[] {android.R.id.text1}); powType.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); vTypeSpinner = (Spinner) findViewById(R.id.typeSpinner); vTypeSpinner.setAdapter(powType); vTypeSpinner.setOnItemSelectedListener(new OnItemSelectedListener(){ public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int i, long id) { Cursor vTypeChose = (Cursor)(vTypeSpinner.getSelectedItem()); if (vTypeChose != null) { String typePicked = vTypeChose.getString( vTypeChose.getColumnIndex(DataBaseHelper.POWERSPORTS_TYPE)); vMake = (Cursor) DataBaseHelper.getPowersportsMake(typePicked); powMake.changeCursor(vMake); Log.e("SpinnerTest", "Type Selected: " + vType.getString(vType.getColumnIndex(DataBaseHelper.POWERSPORTS_TYPE))); } } @Override public void onNothingSelected(AdapterView<?> arg0) { // TODO Auto-generated method stub } }); <Spinner android:id="@+id/typeSpinner" android:layout_width="match_parent" android:layout_height="50dp" android:layout_alignLeft="@+id/textView01" android:layout_centerVertical="true" android:layout_below="@+id/textView01" /> I have tried many different ways of doing this from answers on this website and none have worked. EDIT: If it helps, my spinners are being populated from my database.
ec8baed1794cd39f06e94a1b99d4d9f3d85ab45d27d9eb503c2dfe56eb66437b
['d8374cce2efd4d17b1c80e40e2cf2dd1']
While browsing through Google, I have found an answer to my problem. By adding the code below to my copyDataBase() SQLiteDatabase checkdb = null; try{ String myPath = DB_PATH + DB_NAME; checkdb = SQLiteDatabase.openDatabase(myPath, null, SQLiteDatabase.OPEN_READWRITE); // Once the DB has been copied, set the new version checkdb.setVersion(DATABASE_VERSION); } catch(SQLiteException e) { //database does’t exist yet. } AND having the below code within onUpgrade() if (oldVersion < newVersion){ Log.v("Test", "Within onUpgrade. Old is: " + oldVersion + " New is: " + newVersion); myContext.deleteDatabase(DB_NAME); try { copyDataBase(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } My database now upgrades to the database and deletes the previous on every change of the DATABASE_VERSION integer.
f89bd8a3e237d1776b8a0638257a3f5f50129b909cae32add696e2ae0b1100bc
['d84229dfba254f2ebd47616013f09178']
Yeah, In that way, you don't need to go to personal page to check that. Suppose you are browsing list of question and you don't know whether you already have answered or commented, you may end up revisiting the same question. This will help to avoid user to revisit the question.
1c8f3f051f12656aa5ffd2481e632deab341d232f4ad774990da129a1f8c66b3
['d84229dfba254f2ebd47616013f09178']
So here is the solution that I found for my problem: Since the project that was failing and throwing OutOfMemory error has it own build.xml file. In the build.xml file, there was a property tag that allocates the memory needed for java compiler. That memory was low. After increasing the memory allocation, it resolved my problem. <property name="javac.max.memory" value="2024M" /> Hope it helps
a394fb76c17e87a6905ab7bc80d5d38f3887f0a04d7e065e287fe7632395a730
['d849aa9d1eba422ba2898d2ff2a618d6']
I was working on a feature branch, yet to be completed, but someone in the team merged my branch into the "Develop" branch. The merging point shows my id (I believe being the last committer on the branch), but I didn't merge it myself. Although, I figured out who merged it by email notifications, but is there a way to know directly? just in case, there is no email notification in future, and you need to clear yourself, and don't just take unfair responsibility.
be08b5fec8aa86b300a4212dea673837e519ad35d7b2af8bafa2842ecacd347f
['d849aa9d1eba422ba2898d2ff2a618d6']
``I have a wordpress installed on my Server, everything works fine, I tried to add a contact form on the template using the PHP mail() function, It works well on a remote hosting server, but when i tried to transfer the same code that successfully worked on a hosting server to my work's local server, It doesn't send any email. What could be wrong with the server? my code to process form is:
1d15390f119387e5741c1dd6daf004de8fc47d61568eb4454923aab7d4f50e0e
['d85a814f26ce4ad0b39c5dcd09df7b6d']
As I understand, you want to get the content's view height and give it to the carousel item. You can get position and size properties of items by using their refs. Firstly, import useRef from react. import { useRef } from 'react'; After that, create a ref value. const contentRef = useRef(null); <View ref={contentRef}> .... </View> After that, you can get it's properties by contentRef.nativeEvent.measureInWindow((x, y, width, height) => { // You can do whatever you want with this data })
eab6ceaa790554e9dc4fbd42730c7cd388f778809f5dd037532d1962180564ea
['d85a814f26ce4ad0b39c5dcd09df7b6d']
You shouldn't navigate to Home by navigation function. I assume you are using the latest version of react navigation which is 5. What I recommend you is create a login state in Redux at first. And do something like this // I assume you get your login state from redux and saved in a variable called isLoggedIn. if (!isLoggedIn) { return ( // Auth flow ) } else { return ( // Logged in flow ) }
de8defee17b92be159159dfb6e2faa39dd82306565757ceb54a25be71ee451a4
['d85ab7e3783e4b3d90998a97b2e7c9d2']
SSID is an acronym meaning Service Set IDentifier, and is basically the (usually) human-readable name of a Wi-Fi network. It is encoded in a few packets with ASCII characters, notably in almost every beacon and probe response packet (with a few exception, for example if the network is hidden). So, being a name, generally it isn't "generated" but actually configured by someone, although in some cases it is automatically generated by an algorithm, for example in P2P applications such as a Wi-Fi printer with hotspot (or Wi-Fi Direct) capabilities. It is not a file, so it doesn't make sense for it to be generated and/or broadcasted. I hope I catched your question, if not please clarify what you're looking for.
65f04707581a1198f4f51b533dec1f2ea66455d258dd36cb8e11d74f1f3ed947
['d85ab7e3783e4b3d90998a97b2e7c9d2']
I've never actually used that Wi-Fi module, but it might be that pin 14 is already used by the libraries of the module for something else. I would try connecting the light sensor to another pin or maybe even check through the libraries for signs of using pin 14 for something else.
edcbdf0232d9391c788e1bb036fa5d4d12ab2cf8f2353f89922b27c0a9d7ead8
['d85e72b7f93240468029b7e2ab7f43d3']
In your keras model the input_shape argument is only needed for your first layer and initializes your network. Because you use MaxPooling2D, your image is downsized by 2. If you want to understand your network, try print(model.summary()). So at a point, you downsize your 1x1x4000 image by 2. Try to go less deeper in your network, for instance : model = tf.keras.models.Sequential([ tf.keras.layers.Conv2D(8,(3,3),input_shape = (28,28,1),padding = "same"), tf.keras.layers.Dense(4000,activation = 'sigmoid'), tf.keras.layers.MaxPooling2D(), tf.keras.layers.Conv2D(8,(3,3),padding = "same"), tf.keras.layers.Dense(4000,activation = 'sigmoid'), tf.keras.layers.MaxPooling2D(), tf.keras.layers.Conv2D(8,(3,3),padding = "same"), tf.keras.layers.Dense(4000,activation = 'sigmoid'), tf.keras.layers.MaxPooling2D(), tf.keras.layers.Conv2D(8,(3,3),padding = "same"), tf.keras.layers.Dense(4000,activation = 'sigmoid'), tf.keras.layers.MaxPooling2D(), tf.keras.layers.Flatten(), tf.keras.layers.Dense(10,'softmax')]) The structure looks like : _________________________________________________________________ Layer (type) Output Shape Param # ================================================================= conv2d_35 (Conv2D) (None, 28, 28, 8) 80 _________________________________________________________________ dense_39 (Dense) (None, 28, 28, 4000) 36000 _________________________________________________________________ max_pooling2d_34 (MaxPooling (None, 14, 14, 4000) 0 _________________________________________________________________ conv2d_36 (Conv2D) (None, 14, 14, 8) 288008 _________________________________________________________________ dense_40 (Dense) (None, 14, 14, 4000) 36000 _________________________________________________________________ max_pooling2d_35 (MaxPooling (None, 7, 7, 4000) 0 _________________________________________________________________ conv2d_37 (Conv2D) (None, 7, 7, 8) 288008 _________________________________________________________________ dense_41 (Dense) (None, 7, 7, 4000) 36000 _________________________________________________________________ max_pooling2d_36 (MaxPooling (None, 3, 3, 4000) 0 _________________________________________________________________ conv2d_38 (Conv2D) (None, 3, 3, 8) 288008 _________________________________________________________________ dense_42 (Dense) (None, 3, 3, 4000) 36000 _________________________________________________________________ max_pooling2d_37 (MaxPooling (None, 1, 1, 4000) 0 _________________________________________________________________ flatten_5 (Flatten) (None, 4000) 0 _________________________________________________________________ dense_43 (Dense) (None, 10) 40010 ================================================================= Total params: 1,048,114 Trainable params: 1,048,114 Non-trainable params: 0 _________________________________________________________________ Finally, your network is not well optimized, and I leave it to you to search for and try a better architecture.
8787532b1dee3b2b1f4b10edd94c0766e2ab148d995be5c4f7dcd8d566729cbb
['d85e72b7f93240468029b7e2ab7f43d3']
smoothing works like a moving average. If you increase its size, it will take more values in the near area and it will give this smoothed aspect. To better understand the mathematic behind, check this question. Your model seems almost perfect (slightly underfit), I recommend you to continue the training for about 500-1000 additionnal epochs.
fab715dbe2160ec36e5ba0f782b41ed879c75e8c30764a2176e787efae12aa89
['d85f5bafd74944768a043b0375f44c3d']
i hope this helps <input type="checkbox" id="someting1" onclick="somefunction(this);"> <script type="text/javascript"> function somefunction(e) { alert(e.checked); } </script> There are some other mistakes i saw in this code snippet No need of end input tag <input type="checkbox" id="someting1" /> <- this is just enough No end tags of </tr>,</td>,</ul> (you can see all the html errors in developer tools in new web browsers e.g chrome, firefox, IE7)
7589ae2d476e429f22a071c9769889906a84d3567f84b053d8684ce364e1b950
['d85f5bafd74944768a043b0375f44c3d']
If you add class attribute to the form element then the given styles apply for all the elements within that form element. Instead of doing that if you want to apply style for only one element add id attribute to the element and give styles. Ex: .form { text-align: center; } above code apply center text for all elements. <input id="txtBxId " value="Hello World!"/> #txtBxId { text-align: center; color: red; } but if you do like this it will apply for single element
bf968f2ee4affb0d9572ce6df1e8cc385f02a5283f52526ae820c55881fe3a05
['d862ec2e39f144128313833e6098f31e']
Your issue is that you are calling the 'Protect' function twice. The second call does not have a password in the options, therefore leaving it protected with no password. Unless you are changing the settings of the protection, there is no need to call all of your settings again, the line ActiveSheet.Protect Password:="generation@34" should suffice in password protecting your sheet with the previous settings. Also, the options; AllowDeletingRows:=True AllowInsertingRows:=True Are both set to true, which allows the user to make the changes you stated you wanted to restrict.
d8138fcf77b8587eec59770f4cb1024f1c6733197368aec16feac8e57ae107e4
['d862ec2e39f144128313833e6098f31e']
The code below should work for you. You only really need 2 variables to perform the task, one to loop through the worksheets, and another to loop through your columns on each sheet. Sub WorksheetLoop() Application.ScreenUpdating = False 'Stops the screen from flickering when the code changes worksheets Dim ws As Worksheet Dim intColumn As Integer For Each ws In ThisWorkbook.Sheets 'This tells the code to loop through all of the worksheets in the current workbook without the need to count them ws.Activate 'The worksheet needs to be activated for the Range function to run correctly. For intColumn = 1 To 26 'For columns A to Z ws.Range(Cells(1, intColumn), Cells(2, intColumn)).merge 'Select Row 1 and Row 2 of the column, then merge) Next intColumn 'Moves to the next column Next ws 'Moves to the next worksheet Application.ScreenUpdating = True 'Always set ScreenUpdating back to True at the end of your code End Sub
81b7d71d62ae0d1daf444fb80d772a0bf860c1a36f5c404d6226e6dbc7c9ee09
['d8a177144677476a81d947533d552476']
I am pretty stumped, I thought this would work for sure. I want to insert multiple checkbox values (if selected) into different columns of one table. I was attempting to do this with a for loop and keeping the naming convention consistent so I could utilize the for loop with the checkbox array. Here is php code: $connection = new mysqli("localhost","root","","employee_db"); if(isset($_POST['check'])){ $check = $_POST['check']; if($check){ print_r($check); }else{ echo "nothing checked"; } for($i=0;$i<sizeof($check);$i++){ $query = "INSERT INTO `checklist_test` (`$check[$i]`) VALUE (`\"$check[$i]\"`)"; $result = mysqli_query($connection,$query); if(!$result){ die("NOPE <br>" . mysqli_error($connection)); }else{ echo "yup"; } } } And here is the HTML <form action="" method="post> <input type="checkbox" name="check[]" value="check1">Check1 <input type="checkbox" name="check[]" value="check2">Check2 <input type="checkbox" name="check[]" value="check3">Check3 <input type="submit" value="submit"> </form> The MySQL Columns are "id, check1, check2, check3" so SQL should look like: INSERT INTO `checklist_test` (`id`, `check1`, `check2`, `check3`) VALUES (NULL, 'test', 'test', 'test'); Appreciater outside P.O.V. that I need thanks!
8ea659d5b14b5e801789470eb9ae3c98c7da672a6561059f317f9959af419464
['d8a177144677476a81d947533d552476']
Hello I just need another set of eyes on this. I created this code to set a calendar with the current dates on it, it was working fine but today, sat jan 30, the calendar was still showing it start at sat jan 23. here is the link to my codepen of it: http://codepen.io/cavascript/pen/MKXrbj here is the code: var date = new Date(); var saturday = date.getDate() - date.getDay() - 1; var sunday = date.getDate() - date.getDay() ; var <PERSON> = date.getDate() - date.getDay() + 1 ; var <PERSON> = date.getDate() - date.getDay() + 2 ; var wednesday= date.getDate() - date.getDay() + 3 ; var <PERSON> = date.getDate() - date.getDay() + 4 ; var <PERSON> = date.getDate() - date.getDay() + 5 ; var <PERSON> = (new Date(date.setDate(saturday))).toDateString(); var <PERSON> = (new Date(date.setDate(sunday))).toDateString(); var <PERSON> = (new Date(date.setDate(monday))).toDateString(); var <PERSON> = (new Date(date.setDate(tuesday))).toDateString(); var <PERSON> = (new Date(date.setDate(wednesday))).toDateString(); var <PERSON> = (new Date(date.setDate(thursday))).toDateString(); var <PERSON> = (new Date(date.setDate(friday))).toDateString(); //add to html row $('#dateRow').html('<td colspan="4">Date</td><td colspan="4">'+saturday+'</td><td colspan="4">'+sunday+'</td><td colspan ="4">'+monday+'</td><td colspan="4">'+tuesday+'</td><td colspan="4">'+wednesday+'</td><td colspan="4">'+thursday+'</td><td colspan="4">'+friday+'</td><td>Hours</td><td>Delete</td>'); And here is the HTML: <div class="container-fluid"> <div class="table-responsive"> <table class="table table-bordered"> <tbody> <tr id="dateRow"> </tr> <tr> <td colspan="4">Name</td> <td colspan="2">Br/lnch</td> <td colspan="2">Dinner</td> <td colspan="2">Br/lnch</td> <td colspan="2">Dinner</td> <td colspan="2">Br/lnch</td> <td colspan="2">Dinner</td> <td colspan="2">Br/lnch</td> <td colspan="2">Dinner</td> <td colspan="2">Br/lnch</td> <td colspan="2">Dinner</td> <td colspan="2">Br/lnch</td> <td colspan="2">Dinner</td> <td colspan="2">Br/lnch</td> <td colspan="2">Dinner</td> <td>&nbsp</td> <td>&nbsp</td> </tr> </tbody> </table> </div> Thank you for any input
cbffc83cbe3e708dd6fc07630012924386ec35e20e3635663dc369393df1f312
['d8ac1bc43ad24bf990c55fd13025af7f']
I'm creating a Custom Google Map based on an image in an Adobe Illustrator file. I need to cut the file into 256px x 256px PNGs to feed into the Google Maps API. You can write scripts to automate tasks in Illustrator using ExtendScript, a modified version of JavaScript. I found one example of a script for Photoshop that makes tiles for Google Maps (Hack #68 in this book) but I haven't figured out how to port this over to Illustrator. The main problem is I can't figure out how to tell Illustrator to isolate 256px x 256px portions of an image. The Photoshop script does this by selecting portions of the image of that size and copying them into a new file, but as far as I know you can't do that in Illustrator. Any ideas?
79ee3ad45be05d45cb5b280cd963807525382b42faa14b4a6b660f44bff6e76b
['d8ac1bc43ad24bf990c55fd13025af7f']
I'm using Anemone for some web spidering. I'm storing the results of the spidering in MongoDB. Anemone makes it very easy to do this with: Anemone.crawl("http://www.example.com/") do |anemone| anemone.storage = Anemone<IP_ADDRESS>Storage.MongoDB end as specified here. However, using the code above, Anemone collects and stores a lot of information that I don't need, including each page's response. I only need to store URLs. And, despite spending time with the documentation, I can't figure out how to tell Anemone not to store certain pieces of info. Can anyone advise?
9b0a39c4dae3be6f3a6f62fe38c0a1c6a24781d389147839b34e49cdd603bb47
['d8b68bb4a8d34223a2ecb735252b3423']
This error is from the Android simulators OpenGL rendering engine and not from your code. You can change the rendering settings inside simulators options under settings -> advanced. But from other threads people reported problems can persist, which was the case for me too. Another very useful solution is to add a new logcat filter inside Android Studio. This way you can exclude noisy log messages and keep the log to their app only. Add your exclusions to Log Tag like this: ^(?!(eglCodecCommon|tagToExclude)) Add your package name or prefix to Package Name: com.mycompany. This way it is possible to filter for as many strings you like and keep the log to your package.
c84d078907af5223e18648bee699b385e2bf1a4ad9718677f34115941edfb7c2
['d8b68bb4a8d34223a2ecb735252b3423']
Be sure to develop and test with MoPubs own test ads. This link of the MoPub documentation will show you how to use test ad id's to get an ad on every request while developing. To make things easy for you, this is a often used solution making use of the ternary operator. This says IF development THEN use the test ad id ELSE use your production ad id. moPubView = (MoPubView) findViewById(R.id.adview); moPubView.setAdUnitId(BuildConfig.DEBUG ? "b195f8dd8ded45fe847ad89ed1d016da" : "YOUR_PRODUCTION_BANNER_ID");
d674747d1b7f8ff8fce3b677dc481ce7e600dd481770d9d9c0ced5d352598fe8
['d8c1747820f249a990a616122fabf12a']
I Have configured a list of folders which will be considered for a build in a CMAKE file.But inside those folders there are few source file which will not taken for compilation while build. How can I generate the list of files( C and C++ Source files) that are only considered for compilation for build using CMAKE.?
4da31d0094028f3dfe71f5a934f506c211ae3bcbfca2e1ea2b4aa5021265b5c1
['d8c1747820f249a990a616122fabf12a']
I have a 4 byte data.Each bit will be acting as a switch.I need to enable/disable the switch based on the bits value in the 4 byte data.What will be the optimized way to get the positions of bit that are set out of 32 bits..?
76cffd8da94a18a362bf89a91ccb21a1d4aaa1f383cf6f5dfd728a23b982ea02
['d8d88f188aee41f4a125d070bf950660']
I have a list of dataframes and I want to add a new column named 'new_index' for each df in that list. The 'new_index' is based on another list. lst_dfs = [(pd.DataFrame({'country':['a','b','c','d'], 'gdp':[1,2,3,4], 'iso':['x','y','z','w']})), (pd.DataFrame({'country':['aa','bb','cc','dd'], 'gdp':[11,22,33,44], 'iso':['xx','yy','zz','ww']})), (pd.DataFrame({'country':['aaa','bbb','ccc','ddd'], 'gdp':[111,222,333,444], 'iso':['xxx','yyy','zzz','www']})) lst_index = ['index1','index2','index3'] print(lst_dfs[0]) >>> country gdp iso 0 a 1 x 1 b 2 y 2 c 3 z 3 d 4 w Expected outputs: country gdp iso new_index 0 a 1 x index1 1 b 2 y index1 2 c 3 z index1 3 d 4 w index1 country gdp iso new_index 0 aa 11 xx index2 1 bb 22 yy index2 2 cc 33 zz index2 3 dd 44 ww index2 country gdp iso new_index 0 aaa 111 xxx index3 1 bbb 222 yyy index3 2 ccc 333 zzz index3 3 ddd 444 www index3 Can anyone help me with the problem? Thanks so much.
6513d159e6b5ababa17fb8ae3eed91f18b88c0d76f27408ea3bc57dae569d0e9
['d8d88f188aee41f4a125d070bf950660']
I have two sample dfs as below: df1 Name DOB 0 AMY 20100101 1 AMANDA 19990213 2 LEO 19920103 3 RIO 20200109 4 JEFF 20050314 df2 Name DOB 0 AMY 20100101 1 LEO 19920103 2 SEAN 19971123 3 BEN 20170119 4 SAM 20020615 5 YI 19930202 6 RICHAEE 19980919 7 MICHAEL 19920229 I want to compare the two dfs and the expected results look like: Name DOB AMANDA 19990213 RIO 20200109 JEFF 20050314 I tried to use left join but didn't get what I expected df1=pd.DataFrame({'Name':['AMY','AMANDA','LEO','RIO','JEFF'], 'DOB':['20100101','19990213','19920103','20200109','20050314']}) df2=pd.DataFrame({'Name':['AMY','LEO','SEAN','BEN','SAM','YI','RICHAEEL','MICHAEL'], 'DOB':['20100101','19920103','19971123','20170119','20020615','19930202','19980919','19920229']}) pd.merge(df1, df2, on='Name', how='left') Can anyone help me? Thanks!
b1da143f3bc85ba77094be07a2e02c3880e5f48770ee7854e904263fdd79fbed
['d8e3f250922a41ac96fedae26cb62149']
ive been finishing a school project which needs to get a response from a server so ive written some php code. Ive got everything to align up with tables but when I implement it, I get a Giant gap in code. Has anyone seen this before, I know its the tabs causing this but idk why they keep messing it up, ive tried to move them, but everything in them and more with no luck. below is the outcome of this code, thank you for your help. Code’s outcome <?php // create short variable names $fname = $_POST['fname']; $lname = $_POST['lname']; $address = $_POST['address']; $city = $_POST['city']; $zip = $_POST['zip']; $state = $_POST['state']; $outdate = $_POST['outdate']; $indate = $_POST['indate']; $numberofpeople = $_POST['numberofpeople']; $phone = $_POST['phone']; $email = $_POST['email']; $cardtype = $_POST['cardtype']; $cardnum = $_POST['cardnum']; $specialrequests = $_POST['specialrequests']; $DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT']; ?> <html> <body> <?php //displays what the user put in the form by using the vairables echo "<table>"; echo '<h1>Thank you '.$fname.' '.$lname.' for your Reservation</h1><br>'; echo 'The following is the infomation you entered:<br></tr>'; echo "<tr><td>Number & Street</td><td>$address</td><br/</tr>"; echo "<tr><td>City</td><td>$city</td><br></tr>"; echo "<tr><td>ZipCode</td><td>$zip</td><br></tr>"; echo "<tr><td>State</td><td>$state</td><br></tr>"; echo "<tr><td>Check-In Date</td><td>$indate</td><br></tr>"; echo "<tr><td>Check-out Date</td><td>$outdate</td><br></tr>"; echo "<tr><td>Number of People</td><td>$numberofpeople</td><br></tr>"; echo "<tr><td>Phone</td><td>$phone</td><br></tr>"; echo "<tr><td>Email</td><td>$Email</td><br></tr>"; echo "<tr><td>Card-Type</td><td>$cardtype</td><br></tr>"; echo "<tr><td>Card-Number</td><td>$cardnum</td><br></tr>"; echo "<tr><td>Special Requests</td><td>$specialrequests</td><br></tr>"; echo "</table>"; ?> </body> </html>
714fb67a9d6d76789153b511d4be359d00f25674767315065f078badbd72cbc0
['d8e3f250922a41ac96fedae26cb62149']
for a project I need to make a PHP file that gives back a reservation response and in the Heading of the response I need to have a Bold heading in big letters that says “Thank you <PERSON> for your Reservation”. I know I can use before the php code but when I do i cant get my variables to work. Note: <PERSON> is just a example, I need the name to pop up as what someone enters from the field so basically a non-static heading. Thank you for your time :D <?php //config file require_once("file_exceptions.php"); // create short variable names $fname = $_POST['fname']; $lname = $_POST['lname']; $address = $_POST['address']; $city = $_POST['city']; $zip = $_POST['zip']; $state = $_POST['state']; $outdate = $_POST['outdate']; $indate = $_POST['indate']; $numberofpeople = $_POST['numberofpeople']; $phone = $_POST['phone']; $email = $_POST['email']; $cardtype = $_POST['cardtype']; $cardnum = $_POST['cardnum']; $DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT']; ?> <html> <body> <?php //displays what the user put in the form by using the vairables echo '<p>The following is the infomation you entered: </p>'; echo "Number and Street ".$address."<br />"; echo "City ".$city."<br />"; echo "ZipCode ".$zip."<br />"; echo "State ".$state."<br />"; echo "Check-In Date ".$indate."<br />"; echo "Check-Out Date ".$outdate."<br />"; echo "Number of People ".$numberofpeople."<br />"; echo "Phone ".$phone."<br />"; echo "Email ".$email."<br />"; echo "Card Type ".$cardtype."<br />"; echo "Card Number ".$cardnum."<br />"; ?> </body> </html>
d46c50360b4a3f4f581336bb69c3822c3194389567e002d62848aeb8fd564b5b
['d8e69a3c54c04202838126e753e8b43e']
You can call exportFile from a xmlElement. Once that said, you should be able to get a nicely xml structure. Here is a simple test : app.activeDocument.xmlElements[0].xmlElements[-1].exportFile ( ExportFormat.XML , File ( Folder.desktop + "/test.xml" ) ); Then the output gives me : <?xml version="1.0" encoding="UTF-8" standalone="yes"?><Article>dssds</Article> Loic
c0190732244ad8b9f32b34ea1bfeb24dedca7e5e83df763b09f38e9b52cfa572
['d8e69a3c54c04202838126e753e8b43e']
This should help you. The fillColor attribute of an object is not a reference to the swatch object ( so we could check its name ). Its the description of the color itself (no strings attached to the swatch panel). Once that said, we need to look for teh color typename and its values to have a match. However if you specify CutContour and two colours have this name, it's possible teh result aren't the one expected. function getObjectsByColor ( colorName ) { var doc, items, i = 0, n = 0, item, color, selectionArray = []; if ( app.documents.length == 0 ){ alert("No documents open"); return; } doc = app.activeDocument; try { color = doc.swatches.getByName ( colorName ); } catch(e) { alert( "No such color !"); return; } color = color.color ; items = doc.pageItems; n = items.length; if ( items.length == 0 ) { alert( "No items found"); return; } for ( i = 0; i < n ; i++ ) { item = items[i]; if ( item.fillColor.typename == color.typename && item.fillColor.cyan == color.cyan && item.fillColor.magenta == color.magenta && item.fillColor.yellow == color.yellow && item.fillColor.black == color.black ) { selectionArray [ selectionArray.length ] = item; } } if ( selectionArray.length == 0 ) { alert( "Nothing found" ); return; } app.selection = selectionArray; } getObjectsByColor ("CutContour"); Loic PS: Are you using a Caldera RIP ?
3492a3a840ac852ec8b57ac73556ccdf01e6e425e9726f35eb99673f96311394
['d8eab59b9daa45f4bc756b733ed37e85']
No. It does not yield any security problem if the file is interpreted and executed as a php file. You can even make any extension like ".asp",".jsp" anything you want. Furthermore this may sound a more secure way since an attacker sees the extension and thinks that it is an asp file. However in my opinion it is not a good practice and may make development more confusing. I think if it is a php file the extension should be .php If your desire is to provide security You should check url rewriting and hiding the extension. This way is a more convenient approach.
226010536bd7f65e11a7414f5e04a6e8d5ebc0559c89c408a02fcb9a829f7c32
['d8eab59b9daa45f4bc756b733ed37e85']
I got a advertisement "usb pen-drive" when plugged in autostart windows run (win + r) and writes the company website and press enter, In device manager it is shown as a keyboard. Does anyone know how I can reprogram the keypresses so instead of writing the companys website it presses other keys, Any other useful/fun thing I can use it for? Thanks!
0199fdda385cd16bde2c6170b06faba10dca82405872bdd6615a5b5c343590b0
['d8ebc85bc1314e4cb1cd55a43dbbb4be']
I am new to Android and Java. I am building an app that allows users to push a button which launches an image chooser where they can select from images on the sd card. The app loads with a grid view with 2 cells. One cell has an image view that has a default image. The other is the button. Once, the image is chosen, the image view needs to be displayed in the Image View of the Grid View. I am using a string path that is being decoded from the images uri to create a bitmap. I then am calling imageView.setImageBitmap(bitmap). This is doing nothing. I have tried updating the image resource with a different image in the drawable folders and still nothing. I added a seperate image view just under the grid in my activity, and that image is updating fine which leads me to believe that this has to do with the grid view (this is my first grid view). Any help is very much appreciated. Thank you.
d3950f57ba780e572e2454bfcad24b4573d212b47a66cb18a5902983a2a3ee5e
['d8ebc85bc1314e4cb1cd55a43dbbb4be']
I have found the answer to my problem. I did not fully understand the autoincrement of the sqlite database. Because of that, I was deleting rows that were already empty. The way the database increments is to create an entry higher than all previous entries not just the current highest entry. Therefore, the indexes of my on-screen items did not correspond to the indexes in my database table.
349919527d80fb1b7091e411accd0cd833b0ca92893105bd91fb055187587e54
['d8f3fe6ec8814ff68c27cb30e4489af0']
I am saving the fingerprints in a field "blob", then wonder if the only way to compare these impressions is retrieving all prints saved in the database and then create a vector to check, using the function "identify_finger"? You can check directly from the database using a SELECT? I'm working with libfprint. In this code the verification is done in a vector: def test_identify(): <PERSON> = DB.cursor() cur.execute('select id, fp from print') id = [] <PERSON> = [] for row in cur.fetchall(): data = pyfprint.pyf.fp_print_data_from_data(str(row['fp'])) gallary.append(pyfprint.Fprint(data_ptr = data)) id.append(row['id']) n, fp, img = FingerDevice.identify_finger(gallary)
87eef5299f2e11fade081d27baec596667297dcb5977322486288ec0daecc372
['d8f3fe6ec8814ff68c27cb30e4489af0']
I have errors when compiling sip_4.13.2: c:\Qt\sip>c:\Python27\python configure.py -p win32-g++ c:\mingw32-make voidptr.o: voidptr.c: (. text +0 xa09): undefined reference to _imp__PyCapsule_GetPointer' collect2: ld returned 1 exit status mingw32-make [1]: *** [sip.pyd] Error 1 mingw32-make [1]: Leaving directoryC:\Qt\sip\siplib' mingw32-make: * [all] Error 2 My versions: Windows7_x64 Python2.7x64(Activestate) qt-win-opensource-4.8.0-mingw Qt_SDK_Win_offline_v1_2_en Anyone can help? Thank you.
e6bea9ca36808da5e1041404db83e7ec3a89518e97ae68c7bca37685ae4efd3f
['d8f6a133e1c6477fa2ae6bc48bc2b469']
I have a database server running on a AIX box. When pinging the server I see increased ping times at certain times. I am directly connected to the box and usually see 0ms or 1ms ping times. Sometimes I see ping times of 10ms to 12ms. I am wondering a bit how ping is actually implemented in the TCP stack. If the number of other open connections could affect its responsiveness. Anyone have ideas?
f61f3cedc5e18bb477a51bf1b3508a0f2cdf7589d6dc685189e89b50ddbd0c66
['d8f6a133e1c6477fa2ae6bc48bc2b469']
I want to change all IIS Pools time-out. I'm using below command to get list of App Pool list. %systemroot%\system32\inetsrv\AppCmd.exe list apppool /text:name After that I'm putting name of each app pool in below command to set time-out %APPCMD% set apppool /apppool.name:"BusinessReportAppPool" /processModel.idleTimeout:1:00:00 But I'm looking for a batch file which 1. Search all available app pool 2. Then put the name in above command to change the time-out I know it is possible using For loop in batch, but I'm don't know how to use it. Please help!!
a67f75b3cd4596a360817aabddf91db8749d26ad4247be49ac7ab7041160f5ba
['d8fc3b0e47f04e55aa675659917a7d46']
I'm just starting with Flutter, finished the first codelab and tried to add some simple functionality to it. import 'package:flutter/material.dart'; import 'package:english_words/english_words.dart'; void main() => runApp(new MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return new MaterialApp( title: 'Startup Name Generator', theme: new ThemeData(primaryColor: Colors.deepOrange), home: new RandomWords(), ); } } class RandomWords extends StatefulWidget { @override createState() => new RandomWordsState(); } class RandomWordsState extends State<RandomWords> { final _suggestions = <WordPair>[]; final _biggerFont = new TextStyle(fontSize: 18.0); final _saved = new Set<WordPair>(); @override Widget build(BuildContext context) { return new Scaffold( appBar: new AppBar( title: new Text('Startup Name Generator'), actions: <Widget>[ new IconButton( icon: new Icon(Icons.list), onPressed: _pushSaved, ) ], ), body: _buildSuggestions(), ); } Widget _buildSuggestions() { return new ListView.builder( padding: const EdgeInsets.all(16.0), itemBuilder: (context, i) { if (i.isOdd) return new Divider(); final index = i ~/ 2; if (index >= _suggestions.length) { _suggestions.addAll(generateWordPairs().take(10)); } return _buildRow(_suggestions[index]); }, ); } Widget _buildRow(WordPair pair) { final alreadySaved = _saved.contains(pair); return new ListTile( title: new Text( pair.asPascalCase, style: _biggerFont, ), trailing: new IconButton( icon: new Icon(alreadySaved ? Icons.favorite : Icons.favorite_border), color: alreadySaved ? Colors.red : null, onPressed: () { setState(() { if (alreadySaved) { _saved.remove(pair); } else { _saved.add(pair); } }); }, )); } void _pushSaved() { Navigator.of(context).push( new MaterialPageRoute( builder: (context) { final tiles = _saved.map( (pair) { return _buildRow(pair); // new ListTile( // title: new Text( // pair.asPascalCase, // style: _biggerFont, // ), // ); }, ); final divided = ListTile .divideTiles( context: context, tiles: tiles, ) .toList(); return new Scaffold( appBar: new AppBar( title: new Text('Saved Suggestions'), ), body: new ListView(children: divided), ); }, ), ); } } In the Save suggestions screen I built the same row as in the Sugestions Screen. In the Saved Sugstions screen when you click the heart icon the element is removed from the array of saved items but the screen is not re-rendered. what am I doing wrong here? thanks!
89f3486e0c339d6e5d8e52dfa81e2e8401ab9d86bd2d450e9a0ec36383e406cc
['d8fc3b0e47f04e55aa675659917a7d46']
I cant comment because I dont have the points, so heres a tentative answer with the info at the moment: I had similar issue when running Expo on Windows. to solve I had to close XDE and reinstall. if that's not enough, delete the "node_modules" folder and run "npm install".
adecc1d3a575060e59149c740b59bfa030d225b54f5640aa6f396bd59cf0313f
['d90360c603b94f4e9988593814ec4074']
since each element in v1 can be connected with the elements of v2 in (a+2) ways. since v1 has 'a' elements and each element of v1 can be connected with the elements of v2 in maximum of (a+2) ways. so the total number of maximum ways is a(a+2) = a^2+2a ways. by treating each way as an edge, the maximum number of edges that can be drawn from vertext set v1 to a vertex set v2 is a^2+2a. Hence |E(G)| <= a^2 + 2a.
f95e5c64f9e64d0ad65738c263244835a9836e7b09d552cf1bd562adbb549732
['d90360c603b94f4e9988593814ec4074']
According to OpenVPN documentation server-bridge is a shortcut expression for mode server tls-server push "route-gateway dhcp" and server-bridge nogw is a shortcut expression for mode server tls-server Interestingly push "route-gateway dhcp" activates a DHCP-proxy that stripes out the default gateway option in DHCP response from the original DHCP server. This can be seen in OpenVPN log daemon.notice openvpn[4879]: Extracted DHCP router address: a.b.c.d Your solution would be to use server-bridge nogw and the DHCP response contains the default route option again.
9a4cf29e82585884e9b48225e5333adced993f75ffd69f95fee9f1aaa0f6932f
['d90e38ba8a9b4f56ae41c9992c32b5ab']
From Android end you have to do: you have an IntentService which post location of the user to the server for a certain period of time returns the list of users who are in the radius you define. to get User location follow googleApiClient: http://developer.android.com/training/location/retrieve-current.html And prepare a recycler view to show this result. Send a local broadcast from intent service to tell the activity containing recycler view to update it.
4dda4a5b59404f934f148f4c379c88ed4088bfe627d623ccfb2f9bc85199c51e
['d90e38ba8a9b4f56ae41c9992c32b5ab']
To solve these kind of problems you can do like, this solution can solve very easily to your problem but here we are just taking a constant space which is 256 length array and complexity will be O(n): int []star = new int[256]; while (df.hasNextLine()) { Arrays.fill(star,0); String line = df.nextLine(); for(int i=0;i<line.length();i++){ star[line.charAt(0)]++; } for(int i=0;i<256;i++){ if(star[i]>0 && star[i]>1){ System.out.println("Duplicate characters present.."); } } System.out.println("No Duplicate characters present.."); } I hope you have got an idea..
3c3b11651409ea8eb5a91c76c12fa607d9e6f00ab2f4f237054448a4cf5fa06d
['d9193eb370ee49e0a3cdd0eceff901e2']
Say I make the following transactions: Jan 5, 2011: I buy 100 shares of Stock X Jan 5, 2012. I buy 100 more shares of Stock X. August 1, 2012: I sell 100 shares of Stock X. If I have this correct, then any gains I get in selling the shares I bought in 2011 would mean I would be paying a long-term capital gains tax, but selling the shares I purchased in 2012 would mean I'm paying the short-term capital gains tax. Obviously, I would want to pay the long-term rate since it's smaller. Are there steps I need to take with my brokerage firm to ensure that I'm selling the older shares at the time of the sell? Or will my brokerage firm figure that in and I can figure it all out at tax time? Thanks
aec2610fce073891fbd8c1c0af1003c137396dc33ca9d6b21a39ef78a4adfa8a
['d9193eb370ee49e0a3cdd0eceff901e2']
We're taking over hosting a clients site, and I've downloaded a copy of the site and the database, and set up both in mamp. I've adjusted the db config, and the '/admin/' area all works - however, if I go to 'index.php' i'm just getting a 404 page ('Status: 404 Page Not Found'). I've adjusted the paths in Global Template Preferences, and General Configuration, but to no avail. Any ideas of where I should start looking to find the issue? I'm new to EE... cheers
43793275e11854d33e265da47bb8c8d79fce24fb40f62b35f57671a7c4d7a0a7
['d9253e7153094ceda481144dd0f64eae']
I've noticed that if I create a UIViewController-derived class programatically (without using a nib) to be displayed with a call to presentModalViewController, as the view slides in, it's actually transparent by default until the view covers the entire screen, after which point the 'opaqueness' seems to kick in and the view beneath the modalview is no longer visible. If I create the view using a nib, it slides in as you'd expect, fully covering any views beneath with no transparency issues. I noticed that the Apple examples tend to use a nib-based view for ModalViews, but wondered why. Perhaps I'm missing something.....
e3e4d77cdcadfc13d33a7d53df9f2f34f822148482e558e02ce94ab3a0bac70d
['d9253e7153094ceda481144dd0f64eae']
It was down to a foolish coding error on my part. I realised I'd copied/pasted some code from elsewhere into my ViewDidLoad self.view.backgroundColor = [UIColor colorWithRed:0.6 green:0.4 blue:0.2 alpha:0.3]; I'd set a value of 0.3 for alpha. Set it to 1.0 and transparency issue goes away... Problem solved
1046ac40c66c510c49889bf91d4a6524e98b68e91fe79ff23e1780b0d5a39542
['d9299b8a91ac476190059722dafbbe80']
Well... I found a work around that managed to make it work on SpecRun. I just needed to run my features one by one and make another application manage the traffic line, so I developed an application with Windows Forms that does just that. May not be the best way to approuch this problem, but given my lack of time and the circunstances, it did a great job.
ae1674de34cf3b5b2450442893c06f6e0223c511c06f282a1fe92b448a1f7a1b
['d9299b8a91ac476190059722dafbbe80']
I need to check if service "Advice" has its status running on said server. I made a method that does just that: public static bool CheckServicesFromServer(string pServicos) { ServiceController service = new ServiceController(); List<string> Servicos = pServicos.Split(',').Select(p => p.Trim()).ToList(); if (Config.BaseLogin == BasesSistema.QualityLogin) service.MachineName = "quality"; if (Config.BaseLogin == BasesSistema.TS02Login) service.MachineName = "ts02"; if (Config.BaseLogin == BasesSistema.TS03Login) service.MachineName = "ts03"; if (Config.BaseLogin == BasesSistema.LocalHost) service.MachineName = Environment.MachineName; try { foreach (var item in Servicos) { service.ServiceName = item; if ((service.Status.Equals(ServiceControllerStatus.Stopped)) || (service.Status.Equals(ServiceControllerStatus.StopPending))) { File.AppendAllText(StatusLog.StatusLocation, "O servico " + service.ServiceName + " está parado. a Regra não será gerada."); throw new Exception(); } if (service.Status.Equals(ServiceControllerStatus.Running)) { File.AppendAllText(StatusLog.StatusLocation, "O serviço " + service.ServiceName + "está rodando perfeitamente."); } } } catch (Exception e) { Log.WriteErrorLog(e.Message); throw new Exception(e.Message); } return true; } The thing is, when I run the test, it says "Access Denied", and throws an exception. When I add my user (The user from the computer which is running the application) as an Adm at the server, it runs fine. Is there a way to authenticate my computer so it can have permission to access the server and check its service status?
9f52e166f9a2293f0b2b944aedc5db288f0308f2af2dc93bebd5061839c77653
['d9372796507b49a6b5cd03431b378144']
I have a text file that contains the following: ======== Data: 00:05:<PHONE_NUMBER> ========= 1900-01-01 00:05:<PHONE_NUMBER> ; 0 ; 1.16198 ; 10000000.0 1900-01-01 00:05:<PHONE_NUMBER> ; 1 ; 1.16232 ; 10000000.0 ========= Data: 00:05:12.721536 ========= 1900-01-01 00:05:<PHONE_NUMBER> ; 0 ; 1.16198 ; 10000000.0 1900-01-01 00:05:12.721536 ; 0 ; 1.16209 ; 1000000.0 1900-01-01 00:05:<PHONE_NUMBER> ; 1 ; 1.16232 ; 10000000.0 I am trying to convert it to a csv where each item with a semicolon after it goes into its own cell. Here is an idea of the desired result. I don't want to include the lines that have the = signs in the text file. I currently am using the following code: txt_file = open('Data/Mkt_data_test.txt', 'r') lines = txt_file.readlines() txt_file.close() header_line = ['Time,', 'Bid/Ask,', 'Price,', 'Volume,'] data_lines = [] for line in lines: if '=' not in line: time_data = line.split('\n') for time in time_data: data_lines.append(time+'\n') data_lines = [data.replace(';', ',') for data in data_lines] finished_file = open('mktDataFormat.csv', 'w') finished_file.writelines(header_line) finished_file.writelines(data_lines) finished_file.close() This correctly writes the lines that don't contain an equal sign but there are blank rows where the lines with an '=' are and where there is also just an empty row in the text file. How can I get rid of those blank lines?
e311f2f673dbbf6e7cb7a7bf58b2f07522fd46e92bc015cf437c476fe0fe8726
['d9372796507b49a6b5cd03431b378144']
I have the following checkbox element: <input checked="checked" class="iceSelBoolChkbx" id="mainContentId:newSerchCheckBox" name="mainContentId:newSerchCheckBox" onblur="setFocus('');" onclick="var form=formOf(this);iceSubmitPartial(form, this, event);" onfocus="setFocus(this.id);" onkeypress="var form = formOf(this); Ice.util.radioCheckboxEnter(form,this,event);" type="checkbox"> I currently am locating the element and attempting to click it using check_box = driver.find_element_by_id('mainContentId:newSerchCheckBox') check_box.click() When I run the code it runs without any errors but on the site the checkbox is still unchecked. What could be causing this and is their an alternative way to check the box?
41d97d962aca6e90c45f19266d61607a7aa68cbcf0c1402181e26529e9122025
['d93b77b28d344478895ff93b8885d415']
I had an activity for restoring a full database in SQL server 2008. I had to restore the database will norecovery since I had to restore the differential backups as well which will be shared everyday. My query is how do I check the row count of a database which is under recovery? Thank you.
520746d90681948ecd93e4c131d3287920c43b9198b185e952d2d4e8e0fbc51b
['d93b77b28d344478895ff93b8885d415']
update_with_media is deperecated according to Twitter Developers. You should use media_upload (Twitter docs; Tweepy docs are outdated, but you can check the code at the github repo), this will return a media_id_string as part of the response on upload, then you can send a tweet with the text and the list with the media_id_string (or strings, you can attach up to 4 images). Here is your code using media_upload: auth.set_access_token(access_token, access_token_secret) api = tweepy.API(auth) filename = open ('Shakespeare.txt', 'r') tweettext = filename.readlines() filename.close() media_list = list() response = api.media_upload('Your_image.png') media_list.append(response.media_id_string) randomChoice = random.randrange(len(tweettext)) print (tweettext[randomChoice]) api.update_status(status=tweettext[randomChoice], media_ids=media_list)
bb806a5ddc6ec8c5eaf5ddcf71d897cfc8def9778cb29afb6763bb065d486d84
['d93f175dedba4df2924f57bd2fc1c5af']
Let $a : \mathbb{R}^n * \mathbb{R}^n \rightarrow \mathbb{R}$ be a bilinear form: $$a(x,y) = \sum_{i,j=1}^n a_{ij}x_{i}y_{j} \ \ \ \ \ \ \ a_{ij} \in \mathbb{R},\ \ x = \begin{pmatrix}x_1\\.\\.\\.\\x_n\\\end{pmatrix} ,\ \ y = \begin{pmatrix}y_1\\.\\.\\.\\y_n\\\end{pmatrix}$$ Show that if "a" is a positive definite bilinear form $( \ a(x,x) > 0 \ \ \ \forall x \in \mathbb{R}^{n } \backslash\{0\} \ ) $ then there exists $\alpha > 0$ so that $a(x,x) \ge \alpha||x||_{2}^2$
153c364334a99c04fcb062b7aa0ccd910bee6c35d1ba1e80bdfa97cec31a705e
['d93f175dedba4df2924f57bd2fc1c5af']
I just started studying algorithms and data structures and came across this problem: Given $x \in \mathbb{N}$ and two integer Arrays $A_1$ and $A_2$ each of the length $n$. Write an algorithm in pseudocode that has a time complexity of $O(n.log(n))$ or better to determine the set $$X = \{ (a,b) | a \in A_1 \land b \in A_2 \land a + b = x \}$$ My idea was to first sort the two arrays, loop through the first array and then perform a binary search through the second one and then, if such a couple (a,b) exists, add the result to a 2D Array(?). But i'm not sure if the time complexity is $O(n.log(n))$ or better. Thanks in advance!
3061aec9a0bbbac78970ce6a6f730d5b44e7b3cd009b1b70020e1b7f8f2c96a6
['d942935f5a974ed589829bfa81ece4ac']
The case you are describing is actually Cookie Authentication : 1. Sign in ClaimsIdentity claimsIdentity = new ClaimsIdentity(CookieAuthenticationDefaults.AuthenticationScheme); //Not mandatory: you can add the token to claim for future usage, like API request from server to server claimsIdentity.AddClaim(new Claim("token", tokenId)); var claimsPrincipal = new ClaimsPrincipal(claimsIdentity); await httpContext.SignInAsync(CookieAuthenticationDefaults.AuthenticationScheme, claimsPrincipal); 2. Add Cookie authentication services.AddAuthentication(x => { x.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme; x.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme; }) .AddJwtBearer(x => { x.RequireHttpsMetadata = true; x.SaveToken = true; x.TokenValidationParameters = new TokenValidationParameters { ValidateIssuerSigningKey = true, IssuerSigningKey = new SymmetricSecurityKey(key), ValidateIssuer = false, ValidateAudience = false, ValidateLifetime = true, ClockSkew = TimeSpan.FromMinutes(5), }; }).AddCookieAuthentication(); AddCookieAuthentication looks like: public static AuthenticationBuilder AddCookieAuthentication(this IServiceCollection services) { var authBuilder = services.AddAuthentication(sharedOptions => { sharedOptions.RequireAuthenticatedSignIn = false; sharedOptions.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme; sharedOptions.DefaultAuthenticateScheme = CookieAuthenticationDefaults.AuthenticationScheme; }) .AddCookie(CookieAuthenticationDefaults.AuthenticationScheme, opts => { opts.CookieManager = new ChunkingCookieManager(); opts.Cookie = new CookieBuilder() { Domain = "CookieDomain", Name = "CookieName", Path = "CookiePath", SecurePolicy = CookieSecurePolicy.Always, HttpOnly = true, SameSite = SameSiteMode.Lax, }; opts.ExpireTimeSpan = TimeSpan.FromMinutes(20); opts.ForwardDefaultSelector = ctx => { var authHeader = ctx.Request.Headers["Authorization"].FirstOrDefault(); if (authHeader?.StartsWith(JwtBearerDefaults.AuthenticationScheme) == true) { return JwtBearerDefaults.AuthenticationScheme; } else { return CookieAuthenticationDefaults.AuthenticationScheme; } }; }); return authBuilder; } A browser through which the user signed-in will receive the cookie cookie created in SignIn method and will be able to populate request via client as well.
4c1edadf10d13fb5bfcfa4c587989b425b6094cb54a6953c5dd0eeb6352c9c82
['d942935f5a974ed589829bfa81ece4ac']
There is else way to define the ASPNETCORE_ENVIRONMENT, in the we.config file. If both exists (enviroment variable and in the web.config - the one in the web.config win because it more specific) <configuration> <system.webServer> <aspNetCore processPath="D:\Dev\Example.exe" arguments="" stdoutLogEnabled="false" hostingModel="inprocess"> <environmentVariables> <environmentVariable name="ASPNETCORE_HTTPS_PORT" value="443" /> <environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" /> <environmentVariable name="COMPLUS_ForceENC" value="1" /> </environmentVariables> </aspNetCore> </system.webServer> </configuration> To change the ASPNETCORE_ENVIRONMENT environmentVariable of the web.config while release there are some options, let me know if you want and I will post them.
4cae796ffc06c93f225b732c7aa2c920e3650543d5d0a6ed5cd3e1dec5d5b4a6
['d94f935bcdaa4548a50f3e1f955c86b7']
I'm having a hard time figuring out how to handle exceptions in PL/SQL when the error is returned by a parallel query server. Consider the following : BEGIN EXECUTE IMMEDIATE('ALTER <SOME_INDEX> REBUILD PARALLEL(4) ); EXCEPTION WHEN OTHERS THEN IF SQLCODE = -01652 THEN DBMS_OUTPUT.PUT_LINE('Not enought space'); ELSE DBMS_OUTPUT.PUT_LINE('[SQLCODE] -> '||SQLERRM); NULL; END IF; END; I'm trying to handle ORA-01652 to notify that the tablespace is full. The problem here is that I don't catch : ORA-01652 unable to extend temp segment by 128 in tablespace <TBS> but rather : ORA-12801: error signaled in parallel query server P001 So ORA-01652 isn't stored in SQLCODE. How could I handle the real exception here? Thanks a lot.
9b01f7a99cb3a1e1de2c8a23c9d36eafdd14a97b1ff3a12f7f57955081aea4ea
['d94f935bcdaa4548a50f3e1f955c86b7']
Alright, problem solved using <PERSON> pieces of advice. If someone's having a similar problem, here's the solution I came up with, using the INSTR function : BEGIN EXECUTE IMMEDIATE('ALTER <SOME_INDEX> REBUILD PARALLEL (DEGREE 4)); EXCEPTION WHEN OTHERS THEN -- If the error_stack contains the error code, then the error obviously occured -- INSTR will return the position of the string we are looking for -- otherwise, it will just return 0, hence the search condition : IF INSTR(DBMS_UTILITY.FORMAT_ERROR_STACK,'ORA-01658') > 0 THEN DBMS_OUTPUT.PUT_LINE('Tablespace full, too bad!'); ELSE DBMS_OUTPUT.PUT_LINE('ERROR : '||DBMS_UTILITY.FORMAT_ERROR_STACK); END IF; END;
847e1d69872b7b6e993ffd334508694473e9abe647dd5d5d81192c8f3ceb3f39
['d95779dac6c34523bf0cc86a59727f46']
I found this Stackexchange question trying to troubleshoot a similar issue. Although I cannot be 100% sure our issues are from the same cause I notice some similarities and hope this will help. Specifically I see you are trying to capture a microphone and I see in your post that like I did you are using "arecord -f cd" and "arecord -f dat". I can verify by looking at the physical audio connector plug (which I think is the 3.5mm type) that my microphone is a mono device. My plug has two conductors separated by a rubber ring, which would be one for the shield, and one for the signal, and it looks like what I get when I google "3.5mm mono plug", and not what I get when I google "3.5mm stereo plug". However when I read the man page for arecord, the "cd" and "dat" formats are both stereo: -f cd (16 bit little endian, 44100, stereo) [-f S16_LE -c2 -r44100] -f cdr (16 bit big endian, 44100, stereo) [-f S16_BE -c2 -f44100] -f dat (16 bit little endian, 48000, stereo) [-f S16_LE -c2 -r4800 So it turned out for me that when I record stereo I get the "tapping" or "clicking" noise on average to high volume, and when I record mono (which is what my input really is), I don't. Transcript of one of my tests: michael@sequoia:~$ arecord -f S16_LE -c2 -r44100 /tmp/r1.wav Recording WAVE '/tmp/r1.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo ^CAborted by signal Interrupt... michael@sequoia:~$ aplay /tmp/r1.wav Playing WAVE '/tmp/r1.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo michael@sequoia:~$ #heard tapping michael@sequoia:~$ arecord -f S16_LE -c1 -r44100 /tmp/r1.wav Recording WAVE '/tmp/r1.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono ^CAborted by signal Interrupt... michael@sequoia:~$ aplay /tmp/r1.wav Playing WAVE '/tmp/r1.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono michael@sequoia:~$ #No tapping noise Also I found in the arecord man page 1 channel is the default so the "-c1" is not necessary. -c, --channels=# The number of channels. The default is one channel. Valid val‐ ues are 1 through 32. I hope this helps.
a1610c21bf1f65ad79e2b50f5c953779f5161e78a71b51dbe3ff5a1860540313
['d95779dac6c34523bf0cc86a59727f46']
<PERSON> Actually, as $\lambda$ tends to infinity, this function converges to Gaussian density up to a scaling constant. You might have noticed that this indeed is a convolution of two von-Mises density functions over a finite interval and they are known to converge to Gaussian density as well. I replaced the first term with its first order asymptotic and the arguments of the bessels as $\hat{\lambda}\sqrt{1-c\sin^2(x/2)}$. Then the Laplace.. I got the idea of your method and it is quite neat. The main challenge would be to justify bell shape replacement rigorously. Best..
6dd5aae4491634698926a3eeb228f5b24eeb6a65675080eba8bb5249fafa8249
['d9677bbf5a2d455e96c428c45b909c90']
1) I have epoll_wait(..., events, ...) loop, do I need to reinitialize the events array before each iteration? 2) According to epoll() manual examples there is no need, is it a mistake? 3) Does fds that I didn't handle yet will be re-written in the array next iteration? (I'm using level triggered epoll) I won't miss ready fds? I have tried reading the kernel code to check if it overwrites the array each iteration or only adds to it, but with no success (if you can show me it will be great). struct epoll_event ev, events[MAX_EVENTS]; ... for (;;) { nfds = epoll_wait(epollfd, events, MAX_EVENTS, -1); ... }
7960e645f98a38d95ac4865c784de2399e5cd6501ed029c7c608cd5732678f08
['d9677bbf5a2d455e96c428c45b909c90']
I set the HSTS header on my site and i want to test that the different browsers (chrome, Firefox, IE, Opera) do enforce the header. I set a trusted certificate, connect to the site and I can see the the header at the HTTP response. but i want to validate that the browser do enforce the protocol. In Chrome it's easy and it works: - I can query the site at chrome://net-internals/#hsts - When trying to connect with HTTP i get 0kb response with status 307. - If i change back self-signed cert i can't connect the site and there is no proceed option. The other browsers behave differently, i can't query the HSTS list, the response status and size is different and when changing to self-signed cert (after first trusted connection) i do have proceed option. So how can i validate that the protocol is enforced on each browser?
497e71517a764afd1e408403e80296c3c1974dd18843b4ce4b2705f4faa2c55e
['d96999acf2ce4c6f9d0c5fb2d00184f3']
From what I can make out the problem lies within the SQL side of things upon research you'll see that this error code means that MySQL's utf8 permits only the Unicode characters that can be represented with 3 bytes in UTF-8. so It might be the characters you are using within the cases of SQL
3b05b650d3989f98b709ecddd383fc35b32dd3e47da2feb84ba4a39b11c70bc2
['d96999acf2ce4c6f9d0c5fb2d00184f3']
I'm about to start working on some android development and was wondering after a lot of internet research that are: Zbar and Zxing the only scanning tools out there that can be implemented into android apps is there no other way or getting a code scanner or any other methods of getting a scanner in ? Also how do people find it adding Zbar and Zxing into android based projects,does it always work according to plan ? Please let me know Thanks
2f0603f14b2bbac5a39c829da33a37bd51be6925b2820e733aa97d078d23c055
['d9720173f776433a822089dc3c27107b']
This is an interview question, the interview has been done. Given a class A with members of Class B and C. If an exception happens in class C's constructor but the program can still work well, what is the reason ? My answer: The class C's constructor is not implemented by A. Or, A does not have some instructions to perform some operations on class C. Class C does not have any instantiation. Exception is not an error. Exception handler function handle it well. Any better ideas ? thanks !
1aae65f71f99a8d5530b531aedf2c8174591b6fbba2c91d77f1f54e76888cd5c
['d9720173f776433a822089dc3c27107b']
This is an interview question, the interview has been done. How to make thread synchronization without using mutex, semorphore, spinLock and futex ? Given 5 threads, how to make 4 of them wait for a signal from the left thread at the same point ? it means that when all threads (1,2,3,4) execute at a point in their thread function, they stop and wait for signal from thread 5 send a signal otherwise they will not proceed. My idea: Use global bool variable as a flag, if thread 5 does not set it true, all other threads wait at one point and also set their flag variable true. After the thread 5 find all threads' flag variables are true, it will set it flag var true. It is a busy-wait. Any better ideas ? Thanks the pseudo code: bool globalflag = false; bool a[10] = {false} ; int main() { for (int i = 0 ; i < 10; i++) pthread_create( threadfunc, i ) ; while(1) { bool b = true; for (int i = 0 ; i < 10 ; i++) { b = a[i] & b ; } if (b) break; } } void threadfunc(i) { a[i] = true; while(!globalflag); }
e07f83547189fa784cab19d0ca7a00784f4e7bc41ce0b47c38bc506cb45e452a
['d974c9b05e804f2293ed516deccd5b50']
I want a to write an SQL query in Microsoft SQL Server in PyQt of the type: list=['Engineer', 'Doctor', 'Lawyer'] select * from Occupations where OccupationName in (list) I have read various posts online but they seem to be for SQL Lite or MySQL databases. How would I do this for Microsoft SQL? Also, in MS SQL the string values need to be enclosed in double quotes instead of single quotes used in the list items. How would I do this?
1f146f8b95b672a54877b8237b7ddc712f500f95a78e59ec2836fa46cedcc21d
['d974c9b05e804f2293ed516deccd5b50']
When I enter the query in setQuery in the following way, I get no error: projectModel = QSqlQueryModel() projectModel.setQuery("Select * from xyz") But when I do the exact same thing in the following way, I get an error: query5 = QSqlQuery () projectModel = QSqlQueryModel() query5.prepare ("Select * from xyz") projectModel.setQuery(query5) Why is it so? How do I resolve this error? The error is: <PyQt4.QtSql.QSqlError object at 0x0000000003B6A5F8>
3dd3644b63fdd9f7c719320e5846d4edf8625ae7a6c1c1ea5ad3b3431c112884
['d975fc6f71c249568c85f340f739866d']
I have a dataset containing the infection rate of the Mirai botnet per country. I would like to create a frequency distribution of the infection rate. In order to do so, i use the following lines: inf ['Infection_Rate'] = inf.Infection_Rate.round(2) x =inf['Infection_Rate'].value_counts() x.plot( kind='bar') Which gives me the following plot My main issue with this plot is that every value is plotted on the x-axis of the plot. I would like to limit the labels on the x-axis. As the Infection Rate grossly varies between 0 - 1.5, I would like the x-axis to only display 6 values, for example 0, 0.25,0.5,0.75,1,1.25 How can i achieve this?
754cc1ea571c4fc0136efd79c9ea7c7d444991ef5e74dacbdcac2958c1136697
['d975fc6f71c249568c85f340f739866d']
Im tring to plot a heatmap of Mirai botnet infections per country using geopandas. I have a geodataframe which is structured as follows: geometry Country_Code Infection_Rate 0 MULTIPOLYGON (((11108970.260 445285.130, 11108... IDN 0.01616 6 POLYGON ((3008931.<PHONE_NUMBER><PHONE_NUMBER>, 3007063.917... NaN nan 7 MULTIPOLYGON (((3009012.<PHONE_NUMBER><PHONE_NUMBER>, 30089... CYP 0.06845 8 MULTIPOLYGON (((6915098.<PHONE_NUMBER>.587, 69170... IND 0.0076 As becomes clear from the structure, there are some missing values, as the infection rate is not known for some countries I plot the heatmap as follows: ## Some plot settings colors = 6 cmap = 'Blues' figsize = (16, 10) plotvar = 'Infection_Rate' scheme = 'equalinterval' title = 'Infection rate per country (%)' lables = ['0', '1', '2', '3','4','5'] ## Create the plot ax = geoinfect.plot(plotvar, cmap=cmap, figsize=figsize, k = colors, scheme = scheme, legend=True) ax.set_title(title, fontdict={'fontsize': 20}, loc='left') ax.set_axis_off() ax.set_xlim([-1.5e7, 1.7e7]) legend.set_bbox_to_anchor((.52, .4)) ## Highlight missing values in grey geoinfect[geoinfect.isna().any(axis=1)].plot(ax=ax, color='#D3D3D3') This gives me the following result: Heatmap Apart from poor styling, my main issue with this plot is that the first label of the legend reads "nan-0.21"instead of "0-0.21" Is there a possibility for me to manually edit the legend in such a way that the first label states "0-0.21"? Excuses if this is an obvious mistake, im rather new to programming :)
2ef93ec398b503233c306f6dcfd275ecdfaf9e1030e6ced560e2c741fb5a5bf1
['d97c4d247ad14b4f917cd4a97c39191e']
Here are my 2 spreadsheets: Gsheet1: Googlesheet for replication (only employee # and employee name would change) Gsheet2: Config sheet (contains the employee #, employee name, replication status, pubHTML link) that would feed employee # and employee name on Gsheet1 So I have this code that have these functionalities below: Replicate Gsheet1 depending on the number of employees (I currently have 800+ employees) on Gsheet2 and dump it to a google drive folder. after replication, will set a "completed" replication status to Gsheet2. Change the revision properties of the replicated sheet and make it published to web. Get the link of the published web (pubhtml) and put it on Gsheet2 pubHTML link column. What happens is when I try to logger.log the results of this code below assuming that I have 2 records on my Gsheet2, it loops three times, the first and third record in loop are the same. var TemplatesFromDrive = DriveApp.getFolderById(SpreadsheetApp.getActive().getSheetByName("Master Config").getRange("B2").getValue()).getFiles(); while (TemplatesFromDrive.hasNext()) { var File = TemplatesFromDrive.next(); Logger.log(File.getName()); I was thinking if it's because of the Spreadsheet.flush() that I'm missing. Where is the best place where I can put it on my code so my loop will work properly? Below is my full code. function replicateCards() { var ss = SpreadsheetApp.openById('Gsheet2-xxxx'); var copyCard = SpreadsheetApp.openById('Gsheet1-xxxx'); var getID = DriveApp.getFileById(copyCard.getId()) var card = copyCard.getSheetByName("Card"); var mastersheet = ss.getSheetByName("Mastersheet"); var employeeNumber2 = ss.getRange("A2:A").getValues; var getLastRow = mastersheet.getLastRow(); var destinationFolder = DriveApp.getFolderById('googledrivefolder-xxx'); var changeColorToGrayList = card.getRangeList(['C7', 'E7', 'G7', 'I7', 'K7', 'M7', 'O7', 'Q7', 'C9', 'E9', 'G9', 'I9', 'K9', 'M9', 'O9', 'Q9', 'C11', 'E11', 'G11', 'I11', 'K11', 'M11', 'O11', 'Q11']); var setValueToZero = card.getRangeList(['C8', 'E8', 'G8', 'I8', 'K8', 'M8', 'O8', 'Q8', 'C10', 'E10', 'G10', 'I10', 'K10', 'M10', 'O10', 'Q10', 'C12', 'E12', 'G12', 'I12', 'K12', 'M12', 'O12', 'Q12']); for (i = 1; i < getLastRow; i++) { var badgeStatus = mastersheet.getRange(i + 1, 5).getValue(); if (badgeStatus == "") { var employeeNumber = mastersheet.getRange(i + 1, 1).getValue(); var employeeName = mastersheet.getRange(i + 1, 2).getValue(); copyCard.getRange("H3").setValue(employeeNumber); copyCard.getRange("C3").setValue(employeeName); SpreadsheetApp.flush(); getID.makeCopy(employeeNumber, destinationFolder); mastersheet.getRange(1 + i, 5).setValue("completed"); SpreadsheetApp.flush(); var files = DriveApp.getFolderById(SpreadsheetApp.openById("Gsheet1-xxxx").getSheetByName("Config Sheet").getRange("B1").getValue()).getFiles(); while (files.hasNext()) { var file = files.next(); Logger.log(file.getName()); var Found = false; for (var j = 0; j < employeeNumber2.length; i++) { if (employeeNumber2[j][0] == file.getName()) { Found = true; } } if (Found) { continue; } try { var fileId = file.getId(); var fileName = file.getName(); var revisions = Drive.Revisions.list(fileId); var lastRevisionId = revisions.items[revisions.items.length - 1].id; // get the resource and set the publish parameters var resource = Drive.Revisions.get(fileId, lastRevisionId); // Logger.log(resource); resource.published = true; resource.publishAuto = true; resource.publishedOutsideDomain = true; // publish to the web Drive.Revisions.update(resource, fileId, lastRevisionId); SpreadsheetApp.flush(); var openByID = SpreadsheetApp.openById(fileId); SpreadsheetApp.flush(); var googleDriveSheet = openByID.getUrl().replace("edit", "pubhtml"); // or replace("edit", "pub"); SpreadsheetApp.flush(); mastersheet.getRange(1 + j, 9).setValue(googleDriveSheet); SpreadsheetApp.flush(); } catch (err) { Logger.log(err); } } } } }
248df9dfdd5431cf17e0396451ee3661f90a1a1ddb97cfc29e44b1550404ec2a
['d97c4d247ad14b4f917cd4a97c39191e']
I have this Apps Script wherein I publish each spreadsheet to web (pubHTML) and get the link of it. However, upon testing, the link works via web. I tried also sending the link to my colleague and he was able to access it. But when we tried to open it via mobile, it says that I don't have a permission with the file. Is it safe to assume that published to web spreadsheets doesn't work on mobile phones if we try to access it? Thanks!
f6b0bf7bc52f6d517636d72e1e0be93a71dd2e96df741963691430e569d47b9d
['d99298febf284562a8adaf2c7fab9d20']
I'm trying to implement a SliverAppBar with Tabs. I followed this code tensor-programming / flutter_scroll_tab_tutorial Watch but the behavior of scrolling is very weird, the state is not kept and if you scroll one tab the other tabs will scroll too!! How can I implement this correctly without sharing scroll between tabs and without losing scroll state?? import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', theme: ThemeData( primarySwatch: Colors.blue, ), home: MyHomePage(), ); } } class MyHomePage extends StatefulWidget { @override _MyHomePageState createState() => _MyHomePageState(); } class _MyHomePageState extends State<MyHomePage> with SingleTickerProviderStateMixin { TabController _tabController; ScrollController _scrollViewController; @override void initState() { super.initState(); _tabController = TabController(vsync: this, length: 2); _scrollViewController = ScrollController(initialScrollOffset: 0.0); } @override void dispose() { _tabController.dispose(); _scrollViewController.dispose(); super.dispose(); } @override Widget build(BuildContext context) { // return DefaultTabController( // length: 2, // child: Scaffold( // appBar: AppBar( // title: Text('Example App'), // bottom: TabBar( // tabs: <Widget>[ // Tab( // text: "Home", // icon: Icon(Icons.home), // ), // Tab( // text: "Example page", // icon: Icon(Icons.help), // ) // ], // ), // ), return Scaffold( body: NestedScrollView( controller: _scrollViewController, headerSliverBuilder: (BuildContext context, bool boxIsScrolled) { return <Widget>[ SliverAppBar( title: Text('Tab Controller Example'), pinned: true, floating: true, forceElevated: boxIsScrolled, bottom: TabBar( tabs: <Widget>[ Tab( text: "Home", icon: Icon(Icons.home), ), Tab( text: "Example page", icon: Icon(Icons.help), ) ], controller: _tabController, ), ) ]; }, body: TabBarView( children: <Widget>[ PageOne(), PageTwo(), ], controller: _tabController, ), ), floatingActionButton: FloatingActionButton( child: Icon(Icons.control_point), onPressed: () { _tabController.animateTo(1, curve: Curves.bounceInOut, duration: Duration(milliseconds: 10)); // _scrollViewController.animateTo( // _scrollViewController.position.minScrollExtent, // duration: Duration(milliseconds: 1000), // curve: Curves.decelerate); _scrollViewController .jumpTo(_scrollViewController.position.maxScrollExtent); }, ), ); } } class PageOne extends StatelessWidget { @override Widget build(BuildContext context) { return ListView.builder( itemExtent: 250.0, itemBuilder: (context, index) => Container( padding: EdgeInsets.all(10.0), child: Material( elevation: 4.0, borderRadius: BorderRadius.circular(5.0), color: index % 2 == 0 ? Colors.cyan : Colors.deepOrange, child: Center( child: Text(index.toString()), ), ), ), ); } } class PageTwo extends StatelessWidget { @override Widget build(BuildContext context) { return ListView.builder( itemExtent: 250.0, itemBuilder: (context, index) => Container( padding: EdgeInsets.all(10.0), child: Material( elevation: 4.0, borderRadius: BorderRadius.circular(5.0), color: index % 2 == 0 ? Colors.cyan : Colors.deepOrange, child: Center( child: Text(index.toString()), ), ), ), ); } }
7804fbeef937696c3095d16dc02ac0094220513cb6f5ef4c587e4c7510bc8b04
['d99298febf284562a8adaf2c7fab9d20']
I want to know how to use ChangeNotifierProxyProvider with an existing ChangeNotifier? The documentation clearly says DO use ChangeNotifierProvider.value to provide an existing ChangeNotifier. BUT ChangeNotifierProxyProvider doesn't have a .value method so is it ok to provide my existing ChangeNotifier to the create method? ChangeNotifierProxyProvider<Model1, Model2>( create: (ctx) => model2, update: (ctx, model1, previousModel2) => previousModel2..setModel1(Model1), ),
0dce4d1fac0332f1591ed3d6414e7a694abec9379d35ae0d7c8d6d74b1d7c041
['d9936e6b62aa4e50892c494cf6951a2d']
We are given the following problem: Consider the matrix $$ A = \left[\begin{array}{rrr} \cos\theta & \sin\theta\\ \sin\theta & -\cos\theta \end{array}\right] $$, where $\theta \in \mathbb R$. a) Show that $A$ has an eigenvector in $\mathbb{R^2}$ with eigenvalue $1$. We start the problem by taking the difference of the original matrix with the product of lambda and the identity: $$A-\lambda I = \left[\begin{array}{rrr} \cos\theta -\lambda & \sin\theta\\ \sin\theta & -\cos\theta -\lambda \end{array}\right] $$ We then find its determinant: $$det(A-\lambda I) = (\cos\theta -\lambda)(-\cos\theta -\lambda) - \sin\theta^2$$ which gives us: $\lambda^2 - 1$ and eigenvalues of $\lambda_1 = 1, \lambda_2 = -1$ Using $\lambda_1=1$ we have: $$B(1) = \left[\begin{array}{rrr} \cos\theta -1 & \sin\theta\\ \sin\theta & -\cos\theta -1 \end{array}\right] $$ How do I reduce it and answer the problem: Show that $A$ has an eigenvector in $\mathbb{R^2}$ with eigenvalue $1$?
1b168c6592e4192a184201b8253be2e85c6a3f82e7fab222204139c4be9b0d00
['d9936e6b62aa4e50892c494cf6951a2d']
We are asked: Consider the operator $T:\mathbb{R^2} \rightarrow \mathbb{R^2}$ where $T(x_1, x_2) = (x_1 + kx_2, -x_2)$ for every $(x_1, x_2) \in \mathbb{R^2}$. Here $k \in \mathbb{R}$ is fixed. a) Show that $T$ is a linear operator b) Show that $T$ is one-to-one We know in part (a) that a linear operator is one that satisfies the conditions of linearity $$T(x_1 + x_2) = T(x_1) + T(x_2)$$ $$T(kx_1) = kT(x_1)$$ How do I apply that to the problem given? We know that in part (b) a function is one-to-one whenever $$T(x) = T(y)$$ for some $x$ and $y$ we must have $x=y$ (this is the property of 'onto'). I am almost certain that these responses are not proper solutions to my questions.
c78382370832e21fdd6ad27f3ae6fcc0496a4a1815b8c8a796103c30c0a05875
['d99955d5225a40c385f44ab59f317f5e']
Some ebooks have copyright-related subscripts on each page. I want to know is there anyway to do this job by programming? Specifically speacking, in C programming language. It is impossible for them to add this manually, so I think there should be some smart method, but I failed to get any userful information from google.
3135499f1ff352907bf2931c3ddba7df7e05cc3c45c35ba3106828080e78f4e8
['d99955d5225a40c385f44ab59f317f5e']
I have just read the 'dict.c' source code file of dict implementation. I have got the literal difference between safe/non-safe dict iterator, but don't yet understand the intent of why introducing the new concept of non-safe iterator. It's said by google that 'the new iterator may perform less useless COW'. But I fail to figure out how it works, so turn to here for help. Appreciate for any help, an explanation with example would be better.
00150ac344c41801aadb46cc613a3250aa3e95583cdd8002c10b82fc4f6e470f
['d99da55e355e4caca85c58d5fdf38c61']
I have 6 wcf services , when client send request to service, the server returns a stack trace when there is an exception which is a security concern. Some method do have Faultexception , however , since they are returning the exception object, stack trace is showing up. Now its is a tedious process to modify each and ever method, so is there any way we can show generic error message and not the detailed exception? sample code: { throw new FaultException<ServiceBaseFaultContract>(new ServiceBaseFaultContract(102, string.Format("Error occured"), ex)); }```
4931cd32c0884c80886c1af8bd2a8711d7dabb94b4dcc752cf845914a66536ac
['d99da55e355e4caca85c58d5fdf38c61']
i have a WCF service, when i try to browse the service outside the application i get directory listing,disabled the directory listing by making the change in my code i get 403 error(403 - Forbidden: Access is denied.You do not have permission to view this directory or page using the credentials that you supplied.) which is as expected. But instead of server error i want to show a custom error, i tried adding custom error code in my config but it does not work, is it because it is a web service. Does custom error page only work at application level and not for services?
fc300c1c4f070549add37dd6ce6ba748b40ffa728983af80d01ca96ac6b3ac42
['d9ad19ea60494762bb507b812ad018fa']
You can remove the element in the event handler 'pagebeforecreate'. $(document).bind('pagebeforecreate', function(){ $('#btn1').remove(); }); Else if you want to remove it later events. You can do in other way. $(document).bind('pageshow', function(){ $('div[data-role=controlgroup]').children().each(function(index, value){ if(index === 0) { $(value).remove(); } }); }); https://dl.dropbox.com/u/49735179/Stackoverflow/buttonGroup/test.html
e2befc3d90b1643f5ce5a4baeeb29437e90656466a6fd8547d3501fc2b14284d
['d9ad19ea60494762bb507b812ad018fa']
Changing the styles should fix the problem. make the anchor to inline-block. and give the appropriate padding. Below is the code, after modification. <div data-role="page" id="details" data-add-back-btn="true"> <div data-role="header"> <a href="../page.php" data-icon="home" class="ui-btn-right">Home</a> <h1>Contact Details</h1> </div> <div data-role="content"> <ul data-role="listview" data-inset="true" data-dividertheme="b"> <li>First Name: Tom</li> <li>Surname: Jones</li> <li data-icon="false" style="height:35px;padding-left:15px;font-size:14px">Phone H: <a href="tel:123 4567" style="display:inline-block;padding-left:0px">123 4567</a></li> <li data-icon="false" style="height:35px;padding-left:15px;font-size:14px">Phone W: <a href="tel:123 4567" style="display:inline-block;padding-left:0px">123 4567</a></li> <li data-icon="false" style="height:35px;padding-left:15px;font-size:14px">Phone M: <a href="tel:123 4567" style="display:inline-block;padding-left:0px">123 4567</a></li> </ul> </div> </div> </body> </html>
b42144ed96c45011965b576205e6a97a50b5e0d62e7c31e791f1fe27a2320ca0
['d9b48aa97aab4b73baa530474232a5a7']
Thanks! The only part about that that I'm finding hard to grasp, is that it would have to mean that the field inside each uniform shell outside the gaussian surface cancels at every point inside that shell, and when I visualize it I only see it cancelling at the center of each shell.
6916fa20dabafb2709004fe45e5047f1f8dd7bd35a8dbfcc8e19b1beb5d4182a
['d9b48aa97aab4b73baa530474232a5a7']
Essentially, I'm trying to determine the amount of elastic potential energy stored in a thin, elastic sheet that has gone under some type of stretching (ex. A flag of stretchy fabric waving in the wind). To keep the post as relevant as possible, in this example the sheet can be rectangular and is just being stretched length-wise and width-wise into a larger rectangle. Since I'm simplifying the sheet's behaviour to follow Hooke's Law, I started off by realizing that Hooke's Law applies to linear deformations, and in this case I essentially have two linear stretches of the whole sheet, one in the x direction and another in the y. If I calculate both stretches, I figure that I can compute the elastic potential energy contributed by both and just add them together to get total energy. My main questions would be: 1) Is there any missteps in my reasoning, especially in how I treated the overall stretch as 2 independent stretches (i.e. x and y)? 2) Is there any relationship between the elastic coefficient of the sheet when stretched in the x-direction vs. the y-direction? Or would they be independent and need to be determined by experiment? Thanks in advance! :)
06014cf6bc7934d5b413ddc67f4f5eec235c32c64f4b0891f86736674ef8f785
['d9c211a06f66414db42d21408c2901cc']
No, I'm not saying that, I just want to download the game data of Xbox One and then transfer the game data to XBox One. That's it. I don't want to play on PC. I want to play on Xbox. Only issue with me is i can't download games at home on Xbox One, for now ofcourse.
dab6d7aeb41d76242e9333e48d6c23d310f120559c471b407e9ffb9e4f222d50
['d9c211a06f66414db42d21408c2901cc']
I just wanted to show anyone my solution for the problem above. function cloneClass (func) { if(typeof func == 'function') { var prototype = {}; for (var prop in func.prototype) { prototype[prop] = func.prototype[prop]; }; var Class = function() { var _this = this; var constructor = function() { func.apply(_this, arguments); }; constructor.prototype = _this; for (var property in func) { if(property != "prototype") { constructor[property] = func[property]; } }; return constructor; }; Class.prototype = prototype; return new Class(); } return func; }; Try to dig into it to understand how this is working. Does anyone can see any problems with this implementation, memory leaks etc.?
1277a643c0aa2c0555bbd271727973e066579601060b0955576271193039b1f8
['d9e17b6415ff4e1da4acfd0381aa6849']
I'm using PHPUnit to test a function which downloads a file. I want to test that the correct file is downloaded and so my idea was to check the output of the function. I'm trying to use output buffering: ob_start(); $viewer->downloadById($fileId); $output = ob_get_flush(); $this->assertEquals($expectedFileContents,$output); The test passes/fails when it should, which is good. My issue is that the contents of the output buffer is also printed to the console. How do I hide this?
3fd8fe17bef16dcc9d3b9e2961540577835e3bd80905aae2ffd3c71bb5840a1d
['d9e17b6415ff4e1da4acfd0381aa6849']
There have been a number of questions on this topic on Stackoverflow but not exactly my situation. I have a MySQL server installed on my PC, which was working fine. We used to have a peer-to-peer network in the office. My PC was just named "MY-PC". Some change occurred to the network and my PC is now connected to a "proper" network, and the name of the PC has changed to "MY-PC.mycompanywebsite.co.uk". Now every time I try to connect to MySQL it gives me the error: #1130 - Host 'My-PC.mycompanywebsite.co.uk' is not allowed to connect to this MySQL server I can't log in using the command line tool or anything. Is there a config file setting I need to change to get this working? By the way, this is a version of MySQL which came in an installation of WAMPServer, so I did not configure it myself.
f7bb235df0a113d79109baaeb5ca84b3f7c38f477f95ccb16eb875f74198b909
['d9ebc880be2f43529843ddbac6e22a83']
I want to be able to copy the value from singleStakesBox into each of the stakebox inputs. I have tried to do this by using GetElementById but it only works for the first stakebox. Javascript <script> $('#singleStakesBox').keyup(function () { document.getElementById("stakebox").value = document.getElementById('singleStakesBox').value; calcTotalStake(); }); </script> HTML <input type="text" class="singlesStakeBox" id="singleStakesBox" /> <td><input type="text" class="stakebox" id="stakebox" data-stake="stakebox" /></td> <td><input type="text" class="stakebox" id="stakebox" data-stake="stakebox" /></td> <td><input type="text" class="stakebox" id="stakebox" data-stake="stakebox" /></td> <td><input type="text" class="stakebox" id="stakebox" data-stake="stakebox" /></td>
1a50ba4d0acfaf13313f289f3aa949d7bfe7a4c1fc5f773fa29987265fe70e7b
['d9ebc880be2f43529843ddbac6e22a83']
I have a table which is used to display data from a table in a database. I want to be able to filter the rows of the table, by selecting specific shops from a list of checkboxes. If the check box is ticked the the data for that shop will be displayed in the table. This is the table that I am trying to filter: It is the BettingShop column which will be compared to the checkboxes in order to filter the rows @foreach (var item in Model) { <tr> <td> @string.Format("{0:ddd dd MMM yyyy}", item.DailyReportDate) </td> <td> @Html.DisplayFor(modelItem => item.Estate) </td> <td> @Html.DisplayFor(modelItem => item.BettingShop) </td> <td class="alignRight"> @Html.DisplayFor(modelItem => item.TotalCashStake) </td> <td class="alignRight"> @Html.DisplayFor(modelItem => item.NumberCashSlips) </td> <td class="alignRight"> @Html.DisplayFor(modelItem => item.ShopBalance) </td> <td class="alignRight"> @Html.DisplayFor(modelItem => item.TotalCashIn) </td> <td class="alignRight"> @Html.DisplayFor(modelItem => item.TotalCashOut) </td> </tr> }
624866eee4392491c6c121a5e1817f73ad13e4c149c67ec0cc5c1a549d378c14
['d9fa51bc7b3e4163b4a75c9798863226']
Because of the problems that rails seems to have with this type of association, I recommend an alternative approach. Copy/import the data from the legacy database into the rails app or wrap the legacy database in its own app and present it to rails via an api instead of connecting to multiple databases from inside rails. Otherwise it seems like your best bet is to use the has_many :through approach but remember to never call the associations except through the context of the join model.
678d05c4c2ce2a09a5cfaedf477157cb889b4b8a5ab86328c68ca32aa3400d09
['d9fa51bc7b3e4163b4a75c9798863226']
Would using has_many_through with default_scope work? Something along the lines of: class Employee < ActiveRecord<IP_ADDRESS>Base has_many :assignments has_one :branch, :through => :assignments end class Branch < ActiveRecord<IP_ADDRESS>Base has_many :assignments has_many :employees, :through => :assignments end class EmployeeAssignments < ActiveRecord<IP_ADDRESS>Base attr_accessible :enabled_day, :expiration_day belongs_to :employee belongs_to :branch def self.default_scope where '? BETWEEN enabled_day AND expiration_day', Date.current end end
7124a407c5d0cd3d016c5830ae9176d7039f09596f5002c31ebcfeb572fc72c8
['da053318256e43ebad46373aa20efb98']
Hello everybody well i just had a problem With Shared Object (.so) in REDHAT linux what i want to know is : if i put a new SO in /Lib or /lib64 wich are in the $PATH shal i reboot the server or not... NB : The server is in production and i don't want to reboot it when it's not necessary best regards
94748140e16ab3450eafc17ce236b0d9739ead1735c560cc42ece8f76b8a31a9
['da053318256e43ebad46373aa20efb98']
I am trying to send a notification using the countly API , I found this in the documentation : curl --request POST \ --url 'https://try.count.ly/i/pushes/prepare?args.apps=args.apps&args.platforms=args.platforms&args=args&api_key=api_key' It says that i have to provide args which is a JSON object as string with future message data. They don't provide any clear documentation about how should this arguments be Any help would be appreciated
ad255aa607f9007390775f6c36b15d5d8a60f35ee2bbe78067582f8aa9cb7403
['da0f2dce22754b3e8465e273a97feb7b']
From the Boost 1.58 beta release notes: Important Note There is a bug with the build scripts; you have to specify the address-mode and architecture to b2. I used: ./b2 address-model=64 architecture=x86 to test this. Adding these flags to the b2 command solves the problem without having to exclude the context and coroutine libraries (handy if, say, you actually use these libraries, like I do!). Naturally, if you're building 32-bit libraries, you want to add address-model=32 instead.
2d4d729e70b0397cde5965a6b6abf4d6e0623207de9ba8145770f1ee1b96473a
['da0f2dce22754b3e8465e273a97feb7b']
I assume you mean Organize Includes. I'm not aware of a built-in way to configure that to run after every file-save, nor of a plugin that would do it. Consider filing a bug requesting that an option to run Organize Include be added to Preferences -> C/C++ -> Editor -> Save Actions.
2835f7e542a2c7afa3327862fc867d3db9580b33043213c11939beaa45022858
['da0fd74bb1d24a39aaf43368a3bb976e']
I have a bunch of files using the format file.1.a.1.txt that look like this: A 1 B 2 C 3 D 4 and was using the following command to add a new column containing the name of each file: awk '{print FILENAME (NF?"\t":"") $0}' file.1.a.1.txt > file.1.a.1.txt which ended up making them look how I want: file.1.a.1.txt A 1 file.1.a.1.txt B 2 file.1.a.1.txt C 3 file.1.a.1.txt D 4 However, I need to do this for multiple files as a job on an HPC using sbatch submission. But when I run the following job script: #!/bin/bash #<other SBATCH info> #SBATCH --array=1-10 N=$SLURM_ARRAY_TASK_ID for j in {a,b,c}; do for i in {1,2,3} do awk '{print FILENAME (NF?"\t":"") $0}' file.${N}."$j"."$i".txt > file.${N}."$j"."$i".txt done done awk is generating empty files. I have tried using cat to call the file and then piping it to awk but that also hasn't worked.
b2bff2b65d814ab9913b0982f071a58f4ca330ec3b8ccd9a96c2432c242e98a9
['da0fd74bb1d24a39aaf43368a3bb976e']
I am trying to sample 10000 random rows from a large dataset with ~3 billion rows (with headers). I've considered using shuf -n 1000 input.file > output.file but this seems quite slow (>2 hour run time with my current available resources). I've also used awk 'BEGIN{srand();} {a[NR]=$0} END{for(i=1; i<=10; i++){x=int(rand()*NR) + 1; print a[x];}}' input.file > output.file from this answer for a percentage of lines from smaller files, though I am new to awk and don't know how to include headers. I wanted to know if there was a more efficient solution to sampling a subset (e.g. 10000 rows) of data from the 200GB dataset.
e899e746540bcbd4eaec60e4fff60c4e11ada2c64b624884eb4fe34ce2ad68fe
['da1946cec39c4985b7bbc5895394e0ab']
I had the same issue after upgrading the WAS FP <IP_ADDRESS> to <IP_ADDRESS>. We had two Services with exactly same method name but different targetNameSpace,like DomainService1 has 'get' method and DomainService2 also has 'get' method, but WAS <IP_ADDRESS> throws this exception and doesn't give any clue to find the root cause. Apparently WAS is more strict in recent version with the naming of the methods. This was the exception: org.apache.axis2.jaxws.wrapper.impl.JAXBWrapperException: An internal assertion error occurred. The com.xxx.web.myapp.services.jaxws.GetResponse JAXB object does not have a xxxxxStatus xml After changing the name of the method specific to each service 'getABC' and 'getPQR' it worked!!! hope this works!
50082dc8fc0c84c8f49df84a5507238bb0d586c9dcf1cc3a0ab923f23e491c71
['da1946cec39c4985b7bbc5895394e0ab']
I had the same issue after upgrading the WAS FP <IP_ADDRESS> to <IP_ADDRESS>. We had two Services with exactly same method name but different targetNameSpace,like DomainService1 has 'get' method and DomainService2 also has 'get' method, but WAS <IP_ADDRESS> throws this exception and doesn't give any clue to find the root cause. Apparently WAS is more strict in recent version with the naming of the methods. This was the exception: org.apache.axis2.jaxws.wrapper.impl.JAXBWrapperException: An internal assertion error occurred. The com.xxx.web.myapp.services.jaxws.GetResponse JAXB object does not have a xxxxxStatus xml After changing the name of the method specific to each service 'getABC' and 'getPQR' it worked!!! hope this works!
cd85dee5ab0b3231a314bcb780152a1b3bcfdd6b5f0765f68779034a29db9c54
['da2dd309d9014f0390225f3a2be12d2b']
MySQL - Workbench (PHP): Is it possible to link multiple tables in a relational database without using the JOIN, or INNER JOIN query commands, without duplicating data in tables? For instance I have two tables with collumns: TUsers (Related to TCompanies,1-n) ID_TUsers (UNIQUE ID) TUsers_UserName TUSers_UserContactNumber TCompanies ID_TCompanies (UNIQUE ID) TCompanies_CompanyName TCompanies_CompanyContactNumber In essence; I want to access COMPANY data from the USERS table without doing a JOIN query between the two tables...
0148ee47aed000487543d6478be6ff5085596db36d0d5a4b1ffceb4fb3137379
['da2dd309d9014f0390225f3a2be12d2b']
MySQL - Workbench (PHP): Tables: TUsers (One to many relationship with TCompanies): TUsers_CompanyID (FOREIGN KEY) TUsers_UserName TUsers_UserPassword TUsers_ID (UNIQUE) TCompanies: TCompanies_CompanyName TCompanies_CompanyContactNumber TCompanies_CompanyAddress TCompanies_ID (UNIQUE) Is it possible to link multiple tables in a relational database without using the JOIN, or INNER JOIN query commands, without duplicating data in tables? Thus speaking even another way of creating a relationship that makes the one table "point" to the other's data. So that one can query the following and successfully retrieve all the data from both tables at once: MySQL:SELECT * FROM TUsers; See example above..
f8397ed8b17cad0217a557129c9a8cf632acc9154fc4423acaee2401ce963454
['da4bb1fe5494444bba500bbcaf9a0738']
I have the following list of lists. If last sublist has len>1: x = [[0], [1, 2, 3], [4, 5], [6], [7, 8, 9], [10, 11, 12, 13], [15], [16, 17, 18]] expected_output = [[0, 1, 2, 3], [4, 5], [6, 7, 8, 9], [10, 11, 12, 13], [15, 16, 17, 18]] If last sublist has len==1: x = [[0], [1, 2, 3], [4, 5], [6], [7, 8, 9], [10, 11, 12, 13], [15], [16, 17, 18], [19]] expected_output = [[0, 1, 2, 3], [4, 5], [6, 7, 8, 9], [10, 11, 12, 13], [15, 16, 17, 18], [19]] I'm trying to merge the sublists of length 1 with the next sublist. If the last sublist length is one, I want to leave it as is. I tried writing the following code. xt = [] for i in range(len(x)-1): if len(x[i]) == 1: xt.append(x[i]+x[i+1]) # del x[i+1] if len(x[i])>1: xt.append(x[i]) print(xt)
45e224c824e77ab3b20cf28d8a3d0770a03db02e0632eaf40ecfaa82aa66e828
['da4bb1fe5494444bba500bbcaf9a0738']
I have a list below: tst = [1,3,4,6,8,22,24,25,26,67,68,70,72] I want to group the elements from above list into separate groups/lists based on the difference between the consecutive elements in the list (differing by 1 or 2). If the difference between the consecutive elements is more than 4, then the elements should form a separate list. My expected output from above input is: [[1, 3, 4, 6, 8], [22, 24, 25, 26], [67, 68, 70, 72]] I tried the following code which i think is not the perfect approach. def lsp(litt): lia = [] for i in range(len(litt)-1): if len(litt)>=2: if litt[i+1]-litt[i] >= 4: lia.append(litt[i]) litti = [] for i in lia: if i in litt: litti.append(litt.index(i)) litti.insert(0,0) <PERSON> = [] for i in range(len(litti)-1): littil.append([litti[i],litti[i+1]]) t1 = [] for i,j in enumerate(littil): t2 = [] if i==0: t2.append([j[0], j[1]]) if i!=0: t2.append([j[0]+1,j[1]]) t1.append(t2) t1 = [i for j in t1 for i in j] fl = [] for i,j in t1: fl.append(litt[i:j+1]) fl.append(litt[t1[-1][1]+1:]) return fl I want to achieve this using itertools.groupby, but don't know how to do it.
8ce746642e7b8403d908c37b5ee631d2763a20e0e1da534934f0e4f283675291
['da51353e128c4fbbbde0c9b66c90eeae']
It's tricky, though - " an artificial narrowing of scope" - I am very active on S/W recs but only saw question here because it made it to the "Hot Questions" list. Nothing you can do about it, I guess, just like the overlap between IoT and h/w recommendations. Although at least s/w recs don't seem welcome on S.O anymore.
3c908ee39a2ed36ff106cd3934ad1cf71249108c3e6bc3bdc774185779ce9a15
['da51353e128c4fbbbde0c9b66c90eeae']
"On meta, downvoting usually indicates disagreement" - I see. That is, of course, highly frowned upon on non-meta sites. As I am not so active on meta, I wasn't aware of that; thanks. Thanks for the reverse, but I really don't care about points :-) It is always good to exhange ideas & understand how others think, so thanks for that.
21047f32ad6ace7ff46627490ac485e4b8117d8f5e5556a659809c4478a306bd
['da621b932abd45ecb36f44550909b17d']
To clarify, stuff would normally be going on in the main loop of the program, but I cut it out for clarity's sake here. I'm using the debugger in the IDE to view the registers, not a variable in the program itself (I've tried that also, but it doesn't change the results)
0a04f5ff86fee9c0c06c9912c7768ba79534af7b0bae64f15025ac8937d602aa
['da621b932abd45ecb36f44550909b17d']
I've added a link to a datasheet in the post body. I don't think a reaction is happening due to the +2.5V bias, as the probe can't "tell" that it's floating on top of it (ie. probe common is connected to +2.5V, probe output is connected to the high impedance op-amp terminal).
37e77843629c814114800225fbc93acbc37c79bc785974c327087d3c9df0f1a2
['daa8577096334e418eabd7502467ecd2']
If the other defining characteristic of dragon kings (besides their size) is being "born of unique origins (a "dragon") relative to its peers (other events from the same system)", then maybe the idea is that whatever normal systemic process causes most city sizes to follow Zipf's does not apply for the very largest cities: they achieved their size by some other (knowable, theoretically predictable, but different) process. Just a guess.
9e691319bdeca0e8a7063a9b42733ac9850d424ccf59f0f1d3e9573be5f89f8b
['daa8577096334e418eabd7502467ecd2']
The focal length was found by equating the area of the circular plate to the area of N fresnal half period zones and using the fact R is approximately f is we assume that the source is far away. The intensity was found by usinga phasor diagram and saying the amplitude at P was equal to 2N omega0 and subbing in for N using the first result. No comment was made relating a and f but that could be reasonably assumed.
a517d90b2219da1f27b073462409f66aa9f373d2bdc2eb5525c1d5502eead7f9
['dab2f0f055064b26af93a77c261a2472']
I've been using value_count() to get the counts of unique values in individual rows of dataframe by doing the following: data.iloc[i,2:-1].value_counts() Is it possible to do that for a range of rows? I tried the following, but it didn't work, is it just printed out the range that I specified instead of counting the unique values: data.iloc[0:5,2:-1].value_counts() I would like a similar kind of output (a Series) that I can loop through using .items() Any kind of help would be greatly appreciated! Thank you!
a1f3dde49197438573882cfc7c2a4c43ebb83d42db70e82b0638578552031f36
['dab2f0f055064b26af93a77c261a2472']
I'm trying to download the Caltech-101 dataset, and to do that I used wget http://www.vision.caltech.edu/Image_Datasets/Caltech101/101_ObjectCategories.tar.gz in Powershell. It says "Reading web response" for some time as the number of bytes received goes up, and then I get the following: StatusCode : 200 StatusDescription : OK Content : {31, 139, 8, 8...} RawContent : HTTP/1.1 200 OK x-amz-id-2: JpVe7IUO7M6fWpV33hpaYzsvayEwogYD7jou1naeQmIczvQ0kVPScRPGxgbvHSEWbJP123U4WAc= x-amz-request-id: BC71FD061F396BA1 x-amz-version-id: null Keep-Alive: timeout=5, max=100 C... Headers : {[x-amz-id-2, JpVe7IUO7M6fWpV33hpaYzsvayEwogYD7jou1naeQmIczvQ0kVPScRPGxgbvHSEWbJP123U4WAc=], [x-amz-request-id, BC71FD061F396BA1], [x-amz-version-id, null], [Keep-Alive, timeout=5, max=100]...} RawContentLength : 131740031 The file isn't stored in the folder I run the command from, and when I try tar -zxvf 101_ObjectCat egories.tar.gz I get a failed to open error. Is wget actually downloading anything?
61e1f874ec3c2085bc10b718627bc7c46441b0fd704b276625f4ba6d9589b474
['dac52330ba7947a1ae87ff9fed538413']
I was following the <PERSON> lectures on "Aspects of symmetry" particularly the chapter about the 't <PERSON>'s model. Then I have wandered into older papers like the 't <PERSON>'s papers and many others. And concerning the reason why there are no free quarks in this model it seems to me that their reasoning is the following: Calculate the dressed propagator and you will get something like : $$\frac{ip_-}{2p_+p_- -M^2-\frac{g^2|p_-|}{\lambda\pi}+i\varepsilon}$$ This is a propagator depending on the cut-off $\lambda$.Then, because of the infra-red divergence, we have to restore gauge invariance taking the $\lambda\to 0$ limit. The pole of this propagator is shifted towards $p_-\to \infty$. We conclude that there is no physical single quark state. But, <PERSON> claims (in PhysRevD.14.3451) that the dependence on $\lambda$ has nothing whatever to do with the confinement mechanism. In order to prove that the 't <PERSON>'s argument is wrong, <PERSON> switch off the coulomb potential but retain a constant gauge-dependent term. He finds that the interaction between $\bar{q}q$ pairs cancels the term in the self energy, so that free quarks are produced. So the confinement must be obtained by other means. By the way, It seems that <PERSON> is using the principal value method and not the original 't <PERSON>'s regularization. So it is not obvious for me to realize whether <PERSON> agrees or not. Is the underlying reason of confinememnt (in 't <PERSON>'s model) clear currently? Are <PERSON>'s arguments wrong?
3df58d3363f59bb9f37ccb866811a677585686145adece54ac75445162d6cc7c
['dac52330ba7947a1ae87ff9fed538413']
Let's say I need to solve this functional integral: $$ Z=\int \mathcal{D}x(\lambda)F[x(\lambda)] $$ Then, I want to change the integration to $\mathcal{D}v(\lambda) $. Where $v$ is a shorthand for $v^\mu =\frac{dx^\mu}{d\lambda}$. The reason for this could be, for example, that in the functional $F$ there is no $x$ (just derivatives of $x$) and (for example) integrals of the form: $$\int_{\lambda_i}^{\lambda_f}\frac{dx^\mu}{d\lambda}\frac{dx_\mu}{d\lambda} d\lambda$$ So my guess is that $$Z=\int \mathcal{D}v(\lambda) \det(\frac{\delta x(\lambda)}{\delta v(\lambda)}) G[v(\lambda)]$$ where $$G[v(\lambda)]=F[x(\lambda)]|_{\frac{dx^\mu}{d\lambda}=v^\mu(\lambda)}$$ I wonder if the jacobian would be something relevant, or perhaps something kind of trivial, that I can take out in a constant N $$Z=N\int \mathcal{D}v(\lambda) G[v(\lambda)]$$ Are my steps correct? What would be the functional determinant?
db7c139c56010dd1b71433c0b7fa43ef94a21a925e4d69a3dcf1fb871f8a297f
['dacb11aea5164c6196db06975fa4119a']
I'm trying to display three Google Chart Gauges on a page to represent data from three temperature sensors. I have a JS function GetCurrentTemperature that returns the three temperature values in an array. I want the gauges to update at regular intervals. I've had this working fine with a single gauge, but when I try and use setInterval for the three charts, they're not updating. The code I'm using is listed below. function drawTemperatureGauges() { var currentTemp = GetCurrentTemperature(); var gaugeCount = currentTemp.length; var options = { width: 200, height: 200, redFrom: 65, redTo: 80, yellowFrom: 50, yellowTo: 65, minorTicks: 5, max: 80 }; for(var i=0; i<gaugeCount; i++) { var data = google.visualization.arrayToDataTable([ ['Label', 'Value'], ['Temp', currentTemp[i] ] ]); var divName = 'gauge'.concat(i+1).concat('_div'); var chart = new google.visualization.Gauge(document.getElementById(divName)); chart.draw(data, options); setInterval(function() { var cTemp = GetCurrentTemperature(); data.setValue(0, 1, cTemp[i]); chart.draw(data, options); }, 2000); } } I assume it's because I'm using i inside the anonymous setInterval function. I've looked at posts related to closures and also ones that specify the use of let rather than var but I still can't work out what syntax I need. Any pointers greatly appreciated Bbz
06214c0fda12f952c59f43b81fde003254c383dc67c4e8c38c273bf389a6c154
['dacb11aea5164c6196db06975fa4119a']
Firstly, I've never used threads, but have found lots of examples on the internet about their use but nothing that obviously answers my question. I have a class that loads and manipulates a file(s). It is fairly CPU intensive so I intend to put it in its own thread so that the GUI remains responsive. However, I would also like to use a progress bar to indicate the current status of the file operations. The question is, what is the best way of approaching this, i.e. How do I get my file class to tell the app where it's up to? Do I have to add thread specific code to my class? Or is there an interface I can implement? Or, am I approaching this all wrong. Additionally (sorry, another stupid question) I assume I need an indicator in my file class to tell the thread when it's finished? I'm using VS2010 and intend to build the app with WPF (if that's relevant) Thanks for any advice, <PERSON>
a1741e5abca4bfcdbdc27cbd1fee39ed115d714c6b1bb4af943849043000a8f7
['dacceff55f59448388d6763aa84dad64']
Se alguém puder me ajudar, agradeço muito... Sou iniciante e não estou conseguindo desenvolver a seguinte verificação: Se substring (tarefas, 9, 1) = S, ele deve deletar apenas nas tabelas de Startup Se substring (tarefas, 9, 1) = D, ele deve deletar apenas nas tabelas de Desenvolvimento create table teste ( projeto varchar(255), tarefas varchar (255), inicio varchar(255), nome varchar(255), horas nvarchar(255), atividade varchar(255) ); insert into teste values ('Pxxxx - ','CC210 - D - ','02/03/2020 08:00', 'nome','9','atividade') insert into teste values ('Pxxxx - ','CC210 - D - ','03/03/2020 07:00', 'nome','5','atividade') insert into teste values ('Pxxxx - ','CC210 - D - ','03/03/2020 13:00','nome','4','atividade') insert into teste values ('Pxxxx - ','CC210 - D - ','04/03/2020 09:54','nome', '2','atividade') insert into teste values ('Pxxxx - ','CC210 - D - ','04/03/2020 10:34','nome','2',NULL) Go create procedure sp_SA_INTEGRG7TRELLO AS Begin declare <PERSON>), <PERSON>), <PERSON>) declare cur_teste cursor for select substring (projeto, 1, 7), <PERSON>, inicio from teste; open cur_teste; fetch next from cur_teste into @projeto, @nome, @inicio while @@FETCH_STATUS = 0 Begin Begin delete TB_ITEMSTARTUP from TB_ITEMSTARTUP as I inner join TB_VENDEDOR as V on V.ID_VEND = I.ID_VEND inner join TB_HORASTARTUP as H on H.ID_HS = I.ID_HS inner join TB_PEDIDO as P on P.ID_PED = H.ID_PED inner join TB_FUNCSTARTUP as F on F.ID_VEND = I.ID_VEND where P.NPROJ_PED = @projeto and V.NOM_VEND = @nome and F.DTINIC_FS = @inicio delete TB_HORASTARTUP from TB_HORASTARTUP as H inner join TB_VENDEDOR as V on V.ID_VEND = H.ID_VEND inner join TB_ITEMSTARTUP as I on I.ID_HS = H.ID_HS inner join TB_PEDIDO as P on P.ID_PED = H.ID_PED inner join TB_FUNCSTARTUP as F on F.ID_VEND = H.ID_VEND where P.NPROJ_PED = @projeto and V.NOM_VEND = @nome and F.DTINIC_FS = @inicio delete TB_FUNCSTARTUP from TB_FUNCSTARTUP as F inner join TB_VENDEDOR as V on V.ID_VEND = F.ID_VEND inner join TB_PEDIDO as P on P.ID_PED = F.ID_PED where P.NPROJ_PED = @projeto and V.NOM_VEND = @nome and F.DTINIC_FS = @inicio End Begin delete TB_HORADESENV from TB_HORADESENV as H inner join TB_VENDEDOR as V on V.ID_VEND = H.ID_VEND inner join TB_PEDIDO as P on P.ID_PED = H.ID_PED inner join TB_CENTROCUSTO as C on C.ID_USUGRAV = H.ID_USUGRAV inner join TB_FUNCSTARTUP as F on F.ID_USUGRAV = H.ID_USUGRAV where P.NPROJ_PED = @projeto and V.NOM_VEND = @nome and F.DTINIC_FS = @inicio delete TB_ATIVIDADE from TB_ATIVIDADE as A inner join TB_VENDEDOR as V on V.ID_VEND = ID_VEND inner join TB_PEDIDO as P on P.ID_PED = ID_PED inner join TB_CENTROCUSTO as C on C.ID_USUGRAV = A.ID_USUGRAV inner join TB_FUNCSTARTUP as F on F.ID_USUGRAV = A.ID_USUGRAV where P.NPROJ_PED = @projeto and V.NOM_VEND = @nome and F.DTINIC_FS = @inicio End fetch next from cur_teste into @projeto, @nome, @inicio; End close cur_teste; deallocate cur_teste; End
d03aeadeb8fe3594bea8d722c8217fd10d022ead45b15e065c68fa82a50d6ab4
['dacceff55f59448388d6763aa84dad64']
Sorry, yes I do mean adiabatic (I'm attempting to see when isentropic would be a better approximation for the actual flow and when isothermal would be a better approximation). Yes my main question is how do I estimate the rate of entropy generation? The way I thought of doing it was to calculate the heat transfer and then isothermal flow would provide an upper bound for the entropy generation (I think). Secondly, I understand where the compressible loss coefficient comes from, I just don't understand how to estimate the heat transfer from those equations given that velocity changes. Thank you
a9539ac26a284fa1d717d595ea44eb2f7f154a9f97f7f5a7bb6533baa77542db
['dae8dd8cf6bd43fbaf9c2488b3a031e0']
@Ryan - Wow! Thanks! I guess I'm going to have to go through all the pages and do this with all the font. Much faster than re-typing the whole document that's for sure! For the font that's not on white background I'm going to have to re-type.
8653d9fd58581a7b7f22c80d93545734feddc15420bf65f51403676ef3b5f4d0
['dae8dd8cf6bd43fbaf9c2488b3a031e0']
YOU ROCK. Thank you - I've managed to build on what you gave me and include a lookup to the child accounts using your guidance and have bulkified and updated over 1000 accounts with 4 queries. Thank you so much. and <PERSON> and <PERSON>, thank you so much for gently helping me post a better first question :)
c1f7f2e56330284e7fb7c4a75878bdd1024c9c1a8a1ccbee0b5c694c30df1c9e
['db07a9a1faeb4d2ebc8f27ca213f7fef']
I have an use case where I have to register for content observer in my android app. I want to listen right from app start till my app is closed, but my application contains many activities, which is the best place to register and de-register for the observer? If I do that in my base activity's onResume and onPause, registering and deregistering would happen frequently (as the activities also change during user actions), is there a better place to register and de register? Thanks, <PERSON>.
e7417e1cd5b0743b455af7bf42ad0182c44bdb527a17d39b0415581494ed9603
['db07a9a1faeb4d2ebc8f27ca213f7fef']
I have a dynamodb table with nearly 200k items. I need to trigger a lambda for each item in it (send each item to lambda as input). I want to perform this for every x hours for all the items in the table. Data in table changes every 5 days or so. Is there a way server-less way to automate fetching all the items to lambda via SQS, etc? I cannot have a lambda to scan the entire table since it is too much for a lambda to handle it (given 300 seconds limit, etc). Thanks, <PERSON>.
2fc44511e1797b2ab1babeec3b3b83a422990c6d4716b5987d4608a32eec6e35
['db0839ee00d34f48af887a61950be953']
I traced location.href from a bit of JavaScript within the webarchive and found that on iOS 5 and lower this is the URL of the original HTML that was saved as webarchive. It was serving as a base URL, so relative URLs of resources referenced from the HTML (images, etc.) could be resolved properly and then found within the webarchive (as they are stored there with their original absolute URLs). On iOS 6 however tracing location.href gives URLs like applewebdata://1B648BC1-F143-4245-A7AD-6424C3E3D227, so all relative URLs are resolved relative to this one and of course cannot be found in the webarchive anymore. One of the workarounds I found is to pass something different from nil into loadData:MIMEType:textEncodingName:baseURL:, like this: [webView loadData:serializedWebArchive MIMEType:@"application/x-webarchive" textEncodingName:@"utf-8" baseURL:[NSURL URLWithString:@"file:///"] // Passing nil here won't work on iOS 6 ]; It works on both iOS 6 and iOS 5 and dumping location.href gives the same absolute URL of the original HTML as before. Any drawbacks/suggestions?
49c0a409d8d8c2d115801054219b7d2e39c04dcdbfe92f78d6be5956015f88f3
['db0839ee00d34f48af887a61950be953']
LISTO! El archivo .qrc puede ser lo que Qt designer usa para conectarse a las imágenes. Sin embargo, cuando estoy cargando el archivo .ui en mi aplicación .py, tengo problemas para usar el archivo .qrc, así que en su lugar necesito crear una versión .py de .qrc. Vaya al directorio en el que se encuentra .qrc usando el símbolo del sistema y escriba este comando. Tenga en cuenta que xz es exactamente lo que yo llamé "tuyo", que se puede llamar "cosa más". pyrcc5 xz.qrc -o xz_rc.py Luego, importe esto a su aplicación .py sin necesidad de agregar .py al final, ya que lo estamos importando como un módulo. import xz_rc Ahora su aplicación .py mostrará imágenes gracias a tener acceso a un formato que ahora puede comprender.
3036779cf460a97071fbec0e00e44a9a1968625291e4432f78ae5bfbc846c894
['db08e888ae6249889e083517cc3842ee']
I have a very simple circuit on a breadboard with two push-button switches, an AND gate (74LS08), and an LED. I have the two switches hooked up to pins 1 and 2, while the LED goes from 3 to ground. Pin 14 is given 5 volts, while pin 7 goes to ground. I'm just trying to test to see if the AND gate works and so far it seems as though it doesn't. As soon as I plug in 5 volts to pin 14, I get current through all the output pins, 3, 6, 10, and 13, regardless of what's going on with their respective input pins, even if pin 7 isn't grounded. Obviously, the LED should only turn on when both switches are switched on, but once 5 volts is supplied to pin 14, it doesn't matter what I do to the buttons. I've tried a couple of the same AND gates from the pack, as well as some OR gates, and they all do it.
c6bbf6b87439a7372c99d41c171fffd8d9594f1af3d2f96c2019efda1bc8689c
['db08e888ae6249889e083517cc3842ee']
(2) Let's take that same ballon for instance and draw a cartesian coordinate system on it, and then place to point in it. Whatever air I put into that ballon (so whatever expansion I give to my balloon universe), the distance between those to point in this coordinate system will stay the same ? (Or at least that's what I understand, I'm not trying to make a point here, but more trying to explain how I understand (wrongly with no doubts) so you can perhaps indicate to what I'm missing.)
a44523a3461cc049e29c185de2d0b9a3d1384f2874109d037c076e7f607e9ee8
['db0da6bded454f858eb6e48f00751bc4']
My program is suppose to take different information from the user to save people in the table, but its not saving the information in the table, when I ask to print it, it just prints the table empty. And when I look into the DataBase and View Data on the table, it doesnt save them there either. Here is the HTML of entering information. <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:p="http://primefaces.org/ui"> <body> <ui:composition template="./plantilla/plantilla.xhtml"> <ui:define name="head"> </ui:define> <ui:define name="content"> <h4>Ingresar Información</h4> <hr/> <h:form id="formulario"> <div class="form-horizontal"> <div class="form-group"> <h:outputLabel value="Identificación" for="id" class="control-label col-sm-3"/> <div class="col-sm-3"> <h:inputText id="id" required="true" class="form-control" requiredMessage="Campo requerido" value="#{ingresar.identificacion}"> </h:inputText> <h:message for="id" class="text-danger"/> </div> </div> <div class="form-group"> <h:outputLabel value="Nombre" for="nombre" class="control-label col-sm-3"/> <div class="col-sm-3"> <h:inputText id="nombre" required="true" class="form-control" requiredMessage="Campo requerido" value="#{ingresar.nombre}"> </h:inputText> <h:message for="nombre" class="text-danger"/> </div> </div> <div class="form-group"> <h:outputLabel value="Apellido 1" for="apellido1" class="control-label col-sm-3"/> <div class="col-sm-3"> <h:inputText id="apellido1" required="true" class="form-control" requiredMessage="Campo requerido" value="#{ingresar.apellido1}"> </h:inputText> <h:message for="apellido1" class="text-danger"/> </div> </div> <div class="form-group"> <h:outputLabel value="Apellido 2" for="apellido2" class="control-label col-sm-3"/> <div class="col-sm-3"> <h:inputText id="apellido2" required="true" class="form-control" requiredMessage="Campo requerido" value="#{ingresar.apellido2}"> </h:inputText> <h:message for="apellido2" class="text-danger"/> </div> </div> <div style="text-align: center;"> <h:commandButton value="Guardar" action="#{ingresar.guardarInformacion}"/> </div> </div> </h:form> </ui:define> </ui:composition> </body> Here is the HTML to show the dataTable. <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:p="http://primefaces.org/ui" xmlns:h="http://xmlns.jcp.org/jsf/html"> <body> <ui:composition template="./plantilla/plantilla.xhtml"> <ui:define name="content"> <p:dataTable var="persona" value="#{verestudiante.personas}" rows="5" paginator="true"> <p:column headerText="Identificacion"> <h:outputText value="#{personas.identificacion}"/> </p:column> <p:column headerText="Nombre"> <h:outputText value="#{personas.nombre}"/> </p:column> <p:column headerText="Primer Apellido"> <h:outputText value="#{personas.apellido1}"/> </p:column> <p:column headerText="Segundo Apellido"> <h:outputText value="#{personas.apellido2}"/> </p:column> </p:dataTable> </ui:define> </ui:composition> </body> Here is the POJO with all the variables from the people we are entering to the Database. public class Persona { private int idPersona; private String nombre; private String apellido1; private String apellido2; private String identificacion; public static Persona getPersona(Persona personaParametro){ Persona persona = new Persona(); persona.idPersona = personaParametro.idPersona; persona.nombre = personaParametro.nombre; persona.apellido1 = personaParametro.apellido1; persona.apellido2 = personaParametro.apellido2; persona.identificacion = personaParametro.identificacion; return persona; } public int getIdPersona() { return idPersona; } public void setIdPersona(int idPersona) { this.idPersona = idPersona; } public String getNombre() { return nombre; } public void setNombre(String nombre) { this.nombre = nombre; } public String getApellido1() { return apellido1; } public void setApellido1(String apellido1) { this.apellido1 = apellido1; } public String getApellido2() { return apellido2; } public void setApellido2(String apellido2) { this.apellido2 = apellido2; } public String getIdentificacion() { return identificacion; } public void setIdentificacion(String identificacion) { this.identificacion = identificacion; } } Here is the HibernateUtil we used in the CRUD. public class HibernateUtil { private static final SessionFactory sessionFactory; static { try { // Create the SessionFactory from standard (hibernate.cfg.xml) // config file. //sessionFactory = new AnnotationConfiguration().configure().buildSessionFactory(); sessionFactory = new org.hibernate.cfg.Configuration().configure().buildSessionFactory(); } catch (Throwable ex) { // Log the exception. System.err.println("Initial SessionFactory creation failed." + ex); throw new ExceptionInInitializerError(ex); } } public static SessionFactory getSessionFactory() { return sessionFactory; } } The managedBean(requestedScope) we used to create the list of people to call in the HTML dataTable and the table in the Database. public class verestudiante{ private List<Estudiante> personas = new ArrayList<Estudiante>(); public List<Estudiante> getPersonas() { return personas; } public verestudiante() { } @PostConstruct public void init(){ EstudianteGestion personaGestion = new EstudianteGestion (); personas = personaGestion.readPersonas(); } } Here is the managedBean(requestedScope) we used to insert the information in the first HTML code. /** * Creates a new instance of ingresar */ public ingresar() { } public String guardarInformacion(){ PersonaGestion personaGestion = new PersonaGestion(); Persona persona = Persona.getPersona(this); personaGestion.createPersona(persona); return "verestudiante"; } } And finally, heres the CRUD. public class PersonaGestion { public void createPersona(Persona persona){ Session session = null; try{ SessionFactory sessionFactory = HibernateUtil.getSessionFactory(); session = sessionFactory.openSession(); session.beginTransaction(); persona.setIdPersona((ultimoId() + 1)); session.save(persona); session.getTransaction().commit(); } catch(Exception e){ System.out.println("Error: " + e.getMessage()); } finally{ session.close(); } } public int ultimoId(){ Session session = null; try{ SessionFactory sessionFactory = HibernateUtil.getSessionFactory(); session = sessionFactory.openSession(); session.beginTransaction(); Persona ultimo = (Persona) session.createCriteria(Persona.class) .addOrder(Order.desc("idPersona")).setMaxResults(1).uniqueResult(); session.getTransaction().commit(); return ultimo.getIdPersona(); } catch(Exception e){ System.out.println("Error: " + e.getMessage()); } finally{ session.close(); } return -1; } public List<Persona> readPersonas(){ Session session = null; try{ SessionFactory sessionFactory = HibernateUtil.getSessionFactory(); session = sessionFactory.openSession(); session.beginTransaction(); //Leer la informacion que esta en BD Query query = session.createQuery("from Tabla"); List<Persona> lista = query.list(); session.getTransaction().commit(); return lista; } catch(Exception e){ System.out.println("Error: " + e.getMessage()); } finally{ session.close(); } return null; } public Persona readPersona(String identificacion){ Session session = null; try{ SessionFactory sessionFactory = HibernateUtil.getSessionFactory(); session = sessionFactory.openSession(); session.beginTransaction(); //leer una sola persona por identificacion Query query = session.createQuery("from Persona where identificacion = :identificacionParametro"); query.setParameter("identificacionParametro", identificacion); List<Persona> lista = query.list(); if(lista.size() > 0) return lista.get(0); session.getTransaction().commit(); } catch(Exception e){ System.out.println("Error: " + e.getMessage()); } finally{ session.close(); } return null; } public void updatePersona(Persona persona){ Session session = null; try{ SessionFactory sessionFactory = HibernateUtil.getSessionFactory(); session = sessionFactory.openSession(); session.beginTransaction(); session.update(persona); session.getTransaction().commit(); } catch(Exception e){ System.out.println("Error: " + e.getMessage()); } finally{ session.close(); } } public void deletePersona(Persona persona){ Session session = null; try{ SessionFactory sessionFactory = HibernateUtil.getSessionFactory(); session = sessionFactory.openSession(); session.beginTransaction(); session.delete(persona); session.getTransaction().commit(); } catch(Exception e){ System.out.println("Error: " + e.getMessage()); } finally{ session.close(); } } }
8e1f68308ce60e4a8847705ccb9ce5d6dd7d586836c27abe95ffd3732aef9243
['db0da6bded454f858eb6e48f00751bc4']
I have this part of an app where I need to pull information from a table on SQL Server and print it in a view when I press a button, using AJAX. I have an api connection to the DB and Im using entity framework and an automapper with it. Heres my controller from the frontside of the app: { string baseurl = "https://localhost:44387"; // GET: Asociacion public async Task<ActionResult> GetOne(int? id) { Asociacion aux = new Asociacion(); using (var client = new HttpClient()) { client.BaseAddress = new Uri(baseurl); client.DefaultRequestHeaders.Clear(); client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); HttpResponseMessage res = await client.GetAsync("dinadeco/Asociacion/GetOneById?id=" + id); if (res.IsSuccessStatusCode) { var auxRes = res.Content.ReadAsStringAsync().Result; aux = JsonConvert.DeserializeObject<Asociacion>(auxRes); } } return View(aux); } } Heres the view I have so far, Ive never really used AJAX also its a really big table, here it is: @model Front.DO.Asociacion @{ ViewBag.Title = "GetOne"; } <h2>GetOne</h2> <div> <h4>Asociacion</h4> <hr /> <td> <input type="text" id="searchField" name="searchFieldText" /> </td> <td> <input type="submit" style="color:black;background-color:rgb(216, 214, 208)" value="Search" onclick="submitClick()" /> </td> <dl class="dl-horizontal"> <dt> @Html.DisplayNameFor(model => model.estado) </dt> <dd> @Html.DisplayFor(model => model.estado) </dd> <dt> @Html.DisplayNameFor(model => model.activo_import) </dt> <dd> @Html.DisplayFor(model => model.activo_import) </dd> <dt> @Html.DisplayNameFor(model => model.ano) </dt> <dd> @Html.DisplayFor(model => model.ano) </dd> <dt> @Html.DisplayNameFor(model => model.tipo_id) </dt> <dd> @Html.DisplayFor(model => model.tipo_id) </dd> <dt> @Html.DisplayNameFor(model => model.nombre) </dt> <dd> @Html.DisplayFor(model => model.nombre) </dd> <dt> @Html.DisplayNameFor(model => model.nombre_antes) </dt> <dd> @Html.DisplayFor(model => model.nombre_antes) </dd> <dt> @Html.DisplayNameFor(model => model.representante_id) </dt> <dd> @Html.DisplayFor(model => model.representante_id) </dd> <dt> @Html.DisplayNameFor(model => model.titulo) </dt> <dd> @Html.DisplayFor(model => model.titulo) </dd> <dt> @Html.DisplayNameFor(model => model.region_id) </dt> <dd> @Html.DisplayFor(model => model.region_id) </dd> <dt> @Html.DisplayNameFor(model => model.provincia_id) </dt> <dd> @Html.DisplayFor(model => model.provincia_id) </dd> <dt> @Html.DisplayNameFor(model => model.canton_id) </dt> <dd> @Html.DisplayFor(model => model.canton_id) </dd> <dt> @Html.DisplayNameFor(model => model.distrito_id) </dt> <dd> @Html.DisplayFor(model => model.distrito_id) </dd> <dt> @Html.DisplayNameFor(model => model.domicilio) </dt> <dd> @Html.DisplayFor(model => model.domicilio) </dd> <dt> @Html.DisplayNameFor(model => model.telefono) </dt> <dd> @Html.DisplayFor(model => model.telefono) </dd> <dt> @Html.DisplayNameFor(model => model.fax) </dt> <dd> @Html.DisplayFor(model => model.fax) </dd> <dt> @Html.DisplayNameFor(model => model.email) </dt> <dd> @Html.DisplayFor(model => model.email) </dd> <dt> @Html.DisplayNameFor(model => model.web) </dt> <dd> @Html.DisplayFor(model => model.web) </dd> <dt> @Html.DisplayNameFor(model => model.not_fax) </dt> <dd> @Html.DisplayFor(model => model.not_fax) </dd> <dt> @Html.DisplayNameFor(model => model.not_email) </dt> <dd> @Html.DisplayFor(model => model.not_email) </dd> <dt> @Html.DisplayNameFor(model => model.not_func_regional) </dt> <dd> @Html.DisplayFor(model => model.not_func_regional) </dd> <dt> @Html.DisplayNameFor(model => model.fecha_asamblea) </dt> <dd> @Html.DisplayFor(model => model.fecha_asamblea) </dd> <dt> @Html.DisplayNameFor(model => model.notas) </dt> <dd> @Html.DisplayFor(model => model.notas) </dd> <dt> @Html.DisplayNameFor(model => model.es_cemento) </dt> <dd> @Html.DisplayFor(model => model.es_cemento) </dd> <dt> @Html.DisplayNameFor(model => model.fecha_registro) </dt> <dd> @Html.DisplayFor(model => model.fecha_registro) </dd> <dt> @Html.DisplayNameFor(model => model.fecha_constitucion) </dt> <dd> @Html.DisplayFor(model => model.fecha_constitucion) </dd> <dt> @Html.DisplayNameFor(model => model.tomo) </dt> <dd> @Html.DisplayFor(model => model.tomo) </dd> <dt> @Html.DisplayNameFor(model => model.folio) </dt> <dd> @Html.DisplayFor(model => model.folio) </dd> <dt> @Html.DisplayNameFor(model => model.asiento) </dt> <dd> @Html.DisplayFor(model => model.asiento) </dd> <dt> @Html.DisplayNameFor(model => model.ultimo) </dt> <dd> @Html.DisplayFor(model => model.ultimo) </dd> </dl> </div> <script> function submitClick() { $.ajax({ url: "dinadeco/Asociacion/GetOne?id=" + $('#searchField').val(), type: "GET", }); } </script>
d7005e689790a9cd0504542474523a548500965ad5787cd65b3da7b0618df171
['db13b6f07b194e829ccc82636a0f1b11']
The answer is still "yes" in those cases, for basically the reason you give -- in the case of the monoid of functions with finite support, for any $f, g$ that agree on $B$, there is an $e$ that fixes $B$ and maps every element not in $B$ that is moved either by $f$ or by $g$ to some arbitrary $x\in B$ (provided $B$ is non-empty); we then argue as before. Similarly for the monoid of only finitely non-injective functions.
dab045ceb87859204884d68c0c7147b41124ff5a2b0bc3afbc09f8fabe14727a
['db13b6f07b194e829ccc82636a0f1b11']
I'm also interested in cases where $X = \mathcal{P}(M)$, $mx = \{n\circ m: n\in x\}$, and $M$ a submonoid of the full transformation monoid on $A$. For example, if $A$ is infinite and $M$ is the monoid of surjective functions on $A$, then the answer to question (1) is "no": let $B$ contain all but $n$ members of $A$, for finite $n > 1$, and let $x$ be the set of functions that are surjective on $B$. But what about, e.g., the monoid of functions that map all but finitely many members of $A$ to themselves, or the monoid of functions that are non-injective for only finitely many members of $A$?
4f3f8026acc1dcffdfb67b60ed44884a663d861a5084d780656e9634400bdd52
['db144d682e634055941821f1c8129437']
I have some anoying behaviour with splinter. I do button.click() assert not button.visible # Fails Then I do button.click() time.sleep(1) assert not button.visible # Succeeds That is pretty bad... Is this intended behaviour? Everything else seems to poll and wait for a bit before it fails.
495924669629ca4d291a854b11e2a50a74642fc84da788178da355e6216d41eb
['db144d682e634055941821f1c8129437']
I am building a chat widget, which is minimized (collapsed and fixed to bottom of page) by default and then maximized when clicked. It has a fixed height, and overflow-y: scroll. I want the scrollbar to start at the bottom and scroll upwards, but this is prettry problematic. If I never collapse the widget, which I do with widget.toggle('blind') (JQuery), I can simply scroll with javascript on page load: using .scrollTop(), however, I want the widget to initially be collapsed. Using .scrollTop() on the collapsed widget has no effect! Furthermore, whenever I collapse/expand the widget, it scrolls all the way to the top. Is there a library or do you have some hints to solve this?
0bb2974722b91302a1de88738f3f968a97703658d965dcb8bae15feea5cb71e5
['db24cbf92e44417fbd95b881cad93dfa']
@ChristopherBennett Sure thing. Here's the blue channel visible: https://imgur.com/a/D2tmaXx This is the red channel visible:https://imgur.com/a/I87yiio And here's each respectively in an image editor, note that I intentionally made them the same value. This is the red: https://imgur.com/a/41VzynV This is the blue: https://imgur.com/a/rdrlD11
268e973e1d33734f6d18bc0ecf604144ccb94ceeb45968e2b28840fac78d760a
['db24cbf92e44417fbd95b881cad93dfa']
The scenario is this: I have a development machine I want (need) to have root access to Our admin setups the machines using his own credentials for the root user. The explanation being that if something goes wrong or he needs to change something he just have to remember one password He then proceeds to give each user access to "sudo" without questioning for the password Now I really dislike the fact that sudo wouldn't prompt me for my password. How does a user configuration look like that gives me and the admin complete root permissions (2 logins), with sudo prompting me for my password (and not root) look like?
526b2e7dd98c6d2e06f9bf09259d1f63f81b7d23844faf00ac000e8312236b11
['db2c8102ba1f4c60b76f142ee4fe9a2a']
I'm trying to run scrapy from a single python script http://doc.scrapy.org/en/0.24/topics/practices.html but I get the following error: Traceback (most recent call last): File "single_python_script.py", line 16, in <module> crawler = Crawler(settings) File "/Library/Python/2.7/site-packages/scrapy/crawler.py", line 32, in __init__ self.spidercls.update_settings(self.settings) AttributeError: 'Settings' object has no attribute 'update_settings'
50b44b308ba6b551e217744a4eda5831060a5ca30cf8be67e13b0067a69fd45e
['db2c8102ba1f4c60b76f142ee4fe9a2a']
I want to run scrapy from a single script and I want to get all settings from settings.py but I would like to be able to change some of them: from scrapy.crawler import CrawlerProcess from scrapy.utils.project import get_project_settings process = CrawlerProcess(get_project_settings()) *### so what im missing here is being able to set or override one or two of the settings###* # 'followall' is the name of one of the spiders of the project. process.crawl('testspider', domain='scrapinghub.com') process.start() # the script will block here until the crawling is finished I wasn't able to use this. I tried the following: settings=scrapy.settings.Settings() settings.set('RETRY_TIMES',10) but it didn't work. Note: I'm using the latest version of scrapy.
30e14af660e4895db4c07cadde43106df42a15bcea70e59502c15e584ef4cf1a
['db2e8525f8244e0f8bed5e1e291a5ba3']
I am on the Cedar stack and it seems that heroku domains:add myDomainName is not working : ! Dev apps cannot have custom domains. Upgrade to Basic or Production to continue. And the Basic pack is 18$/m...whereas everywhere people are saying Heroku is free with custom domains...:(. I tried to contact the Heroku support by I had this answer : I didn't see that your app was on the Dev tier. This tier does not allow for custom domains. If you are interested in having a custom domain on this app, you would need to upgrade to the Basic tier for that app. I am really confused as everywhere people are saying that is it free :s. Does somebody know the answer please? Thanks a lot! Rémi
9ce506784dbb3cdef476a3434df361447b9da12ac375e9b62f07c1d05fb2bba6
['db2e8525f8244e0f8bed5e1e291a5ba3']
I would recommend to not set "noImplicitAny" to true because it is very useful, in your own codebase, to ensure you are fully taking advantage of one of the power of Typescript (type checking). Your issue here is that your typescript transpiler is processing your node_modules libraries. And you don't really want that because you trust your third party libraries. The easiest way to stop that is to simply add an exclude field in your tsconfig.json (https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) If your tsconfig.json is at the root folder, and same for your node_modules folder, you can add that: "exclude": [ "node_modules" ] And...that's it!
418d65ba200a90e54ac9dcfc19176097f1f32ca7d1336645e67ad936304d3898
['db457feaed504966a9e12ed366004f3e']
You are not providing a fully functioning example, so I can't test that this works as intended, but can't you just make dict_accumulated['Data'] and dict_accumulated['Acumulado'] lists and then append to them in each loop? Something like this: len_fundo = len(self.fundo) investiment = self.fundo.iloc[0] dict_accumulated = {} dict_accumulated['Data'] = [] dict_accumulated['Acumulado'] = [] for value in range(1, len_fundo): next_line = self.fundo.iloc[value] dict_accumulated['Data'].append(next_line['Data']) dict_accumulated['Acumulado'].append(next_line['PL'] - investiment['PL']) investiment = next_line accumulated = pd.DataFrame(data=dict_accumulated, index=[value]) return accumulated
677879d2d706fb0d2028bc54987a6a19ec37200e644ae25d4c2b57492c8e8fab
['db457feaed504966a9e12ed366004f3e']
I would round by calculating which valid grade it is closest to and returning that one: import numpy as np def roundGrade(grade): validGrades = np.array([-3,0,2,4,7,10,12]) return validGrades[np.argmin((grade-validGrades)**2)] This of course only allows you to pass a single grade at a time, but you can just loop over your array of decimals, either outside the function or inside it to make it array compatible.
3c3fa7ed2cf0b729f95e9aace633e6810fc0a0a8ffd7d26ecee5fe40d053c7bd
['db4ae1874ca94e24850f9a11ae6f4da9']
Collecting list is a little bit tricky. Here's an example: library(XML) url <- "http://www.asx200list.com" getASX200 <- readHTMLTable(url, which=1, header = TRUE) codes <- getASX200$Code codes <- lapply(codes, as.character) datList <- list() for (i in 1:200) { URL2 <- paste("http://ichart.finance.yahoo.com/table.csv?s=", codes[i], ".AX", sep = "") dat <- read.csv(URL2) dat$Date <- as.Date(dat$Date, "%Y-%m-%d") dat$Code <- codes[i] datList <- c(datList, list(dat)) } print(head(datList[[1]]))
de25d34f396d3243e6c1f49071b566a84cb04d0b025dbbbc359d3cc7db29238b
['db4ae1874ca94e24850f9a11ae6f4da9']
Following code converts Scala List into java.util.List (Tested in Scala 2.11) import scala.collection.JavaConverters._ val a = List(1, 2, 3) val b = a.asJava However, the conversion result seems incomplete. Because some methods in java.util.List do not work. scala> b.remove(2) java.lang.UnsupportedOperationException at java.util.AbstractList.remove(AbstractList.java:161) ... 29 elided My workaround is as follows: val c = new java.util.ArrayList(a.asJava) This works but seems redundant in API-design perspective. Is this the correct way of using asJava method? Why does Scala's JavaConverters produce incomplete result?
611a95222b597533a526624f76f184a2b37ef84c8c001a641fa3a1e78f9cc161
['db590cc991c648b19e230d56a99e3bc4']
At the bottom of your page (with the submit button on it), the following javascript might help. This will prevent double-clicks by disabling the control: <script type="text/javascript" language="javascript"> Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(DoubleClickHandler); function DoubleClickHandler(sender, args) { var c = args.get_postBackElement(); c.disabled = true; } </script> There are lots of other approaches; checking on the server side is safest, but more complex to implement in asp.net. A different approach sometimes used is to not prevent the double submit, but rather store these email requests (in a db, for example), then a task would send all the emails every 5 minutes (say), removing duplicates at the point.
b6bc702cf063dbefaccd63716eb9500ffd9b1d92d5bf50cc394f977706d334cd
['db590cc991c648b19e230d56a99e3bc4']
Well, you really should use a model, but if you insist doing things by hand, I'd still recommend using the jquery validation plugin. An example based on http://docs.jquery.com/Plugins/Validation#Example: (Note: the bit you're looking for is @Html.TextBox("TestIt", "", new { @class="required" }), which add the class="required" attribute to the textbox, which in turn tells jquery validate that it's a required field.) <html> <head> <script src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript" src="http://jzaefferer.github.com/jquery-validation/jquery.validate.js"></script> <style type="text/css"> * { font-family: Verdana; font-size: 96%; } label { width: 10em; float: left; } label.error { float: none; color: red; padding-left: .5em; vertical-align: top; } p { clear: both; } .submit { margin-left: 12em; } em { font-weight: bold; padding-right: 1em; vertical-align: top; } </style> <script> $(document).ready(function(){ $("form").validate(); }); </script> </head> <body> @using (Html.BeginForm()) { <center> <h1> 3D Pay Örnek Sayfa</h1> <table class="tableClass"> <tr class="trHeader"> <td>Test</td> <td>@Html.TextBox("TestIt", "", new { @class="required" })</td> </tr> </table> </center> <input type="submit" id="SubmitData" name="SubmitData" value="Submit" /> } </body> </html> Please remember this is just client side validation - you also need to validate on the server side too. As you're not using a model, this will probably mean some custom controller code to validate each input.
e72688c1e144b321eeb54428bc9a28ff782642a97eddd48a197d5011a2c56dba
['db5f05775a7347308c00b9a989cbd721']
This is screenshot from analytics report: Analytics Report Image When I try to use google analytics report php api (v.2.2.2) with the filter event Category (filtered by "Videos" category): $dateRange = new Google_Service_AnalyticsReporting_DateRange(); $dateRange->setStartDate("3daysago"); $dateRange->setEndDate("today"); // Create the Metrics object. $ev = new Google_Service_AnalyticsReporting_Metric(); $ev->setExpression("ga:eventValue"); $ev->setAlias("EventValue"); $tEv = new Google_Service_AnalyticsReporting_Metric(); $tEv->setExpression("ga:totalEvents"); $tEv->setAlias("Total Events"); $avg = new Google_Service_AnalyticsReporting_Metric(); $avg->setExpression("ga:avgEventValue"); $avg->setAlias("Avg Value"); //Create the dimensions // $sc = new Google_Service_AnalyticsReporting_Dimension(); // $sc->setName("ga:subContinent"); $ec = new Google_Service_AnalyticsReporting_Dimension(); $ec->setName("ga:eventCategory"); $ea = new Google_Service_AnalyticsReporting_Dimension(); $ea->setName("ga:eventAction"); $el = new Google_Service_AnalyticsReporting_Dimension(); $el->setName("ga:eventLabel"); // Create the segment dimension. $segmentDimensions = new Google_Service_AnalyticsReporting_Dimension(); $segmentDimensions->setName("ga:segment"); // Create Dimension Filter. $dimensionFilter = new Google_Service_AnalyticsReporting_SegmentDimensionFilter(); $dimensionFilter->setDimensionName("ga:eventCategory"); $dimensionFilter->setOperator("EXACT"); $dimensionFilter->setExpressions(array("Videos")); // Create Segment Filter Clause. $segmentFilterClause = new Google_Service_AnalyticsReporting_SegmentFilterClause(); $segmentFilterClause->setDimensionFilter($dimensionFilter); // Create the Or Filters for Segment. $orFiltersForSegment = new Google_Service_AnalyticsReporting_OrFiltersForSegment(); $orFiltersForSegment->setSegmentFilterClauses(array($segmentFilterClause)); // Create the Simple Segment. $simpleSegment = new Google_Service_AnalyticsReporting_SimpleSegment(); $simpleSegment->setOrFiltersForSegment(array($orFiltersForSegment)); // Create the Segment Filters. $segmentFilter = new Google_Service_AnalyticsReporting_SegmentFilter(); $segmentFilter->setSimpleSegment($simpleSegment); // Create the Segment Definition. $segmentDefinition = new Google_Service_AnalyticsReporting_SegmentDefinition(); $segmentDefinition->setSegmentFilters(array($segmentFilter)); // Create the Dynamic Segment. $dynamicSegment = new Google_Service_AnalyticsReporting_DynamicSegment(); $dynamicSegment->setSessionSegment($segmentDefinition); $dynamicSegment->setName("Video"); // Create the Segments object. $segment = new Google_Service_AnalyticsReporting_Segment(); $segment->setDynamicSegment($dynamicSegment); // Create the ReportRequest object. $request = new Google_Service_AnalyticsReporting_ReportRequest(); $request->setViewId($VIEW_ID); $request->setDateRanges(array($dateRange)); $request->setSegments(array($segment)); $request->setDimensions(array($segmentDimensions,$ec,$ea,$el)); $request->setMetrics(array($ev, $avg, $tEv)); // Create the GetReportsRequest object. $getReport = new Google_Service_AnalyticsReporting_GetReportsRequest(); $getReport->setReportRequests(array($request)); // Call the batchGet method. $body = new Google_Service_AnalyticsReporting_GetReportsRequest(); $body->setReportRequests( array( $request) ); $response = $analyticsreporting->reports->batchGet( $body ); printResults($response->getReports()); And the result return all categories (Banner and Videos): ga:segment: Video ga:eventCategory: Banner ga:eventAction: click ga:eventLabel: click on banner EventValue: 0 Avg Value: 0.0 Total Events: 52 ---------------------------- ga:segment: Video ga:eventCategory: Videos ga:eventAction: play ga:eventLabel: Fall Campaign EventValue: 0 Avg Value: 0.0 Total Events: 29 I'm a beginer on this, can you show me what's my problem? ./Thanks
c202340967a3848b8cd9579b5a5e1ddce5f0bd5edad3add7a67557ead54de701
['db5f05775a7347308c00b9a989cbd721']
I'm using default apache of macos. My wp site can't install new or update plugins. But this is working normal in live site. These are list error I can see while I'm trying to install a new plugin: Error notice: Installation failed: Internal Server Error Status on button install now: Update Failed! In console debug I see: .../wp-admin/admin-ajax.php 500 (Internal Server Error) I tried to search and do in some ways, ex: change chown, permission to 777, added define('FS_METHOD', 'direct'), change memory_limit... But still don't working. So I went throught and I saw when I comment in the line @set_time_limit( 300 ); at line 450 in file .../wp-admin/includes/class-wp-upgrader.php I see it's working. But I don't understand why this happen? public function install_package( $args = array() ) { global $wp_filesystem, $wp_theme_directories; $defaults = array( 'source' => '', // Please always pass this 'destination' => '', // and this 'clear_destination' => false, 'clear_working' => false, 'abort_if_destination_exists' => true, 'hook_extra' => array() ); $args = wp_parse_args($args, $defaults); // These were previously extract()'d. $source = $args['source']; $destination = $args['destination']; $clear_destination = $args['clear_destination']; //@set_time_limit( 300 ); **If I comment at here it's working** if ( empty( $source ) || empty( $destination ) ) { return new WP_Error( 'bad_request', $this->strings['bad_request'] ); } $this->skin->feedback( 'installing_package' ); .... } Can anyone suggest to me how to fix this? Thanks
2752a27f11b946ca6d7fbabfbfdc5f6c1b7627b304e2f0e2e703b6725f32f00b
['db5f6d59d3394a4489f66745a2cbdce0']
I am working on an m1 abrams model and I plan on using it in an animation but I have encountered a problem. I've parented the bezier circle to the hull and all works well when the tank is going straight, but then... i tried rotating it... Its probably some amateurish mistake but I'm new and i cant find a solution. googled it, the answers were mostly years ago so I'll also contribute by having a newer thread to look by everyone else
9123be838d253611cce95d47ef1dc666889488e724c5ae0e2c3121ab267d61ed
['db5f6d59d3394a4489f66745a2cbdce0']
+1 for "but even when a scientist is the host, you need to be suspect". Far too often have I had to explain to my mother and others, that documentaries are often sensationalistic, scientists are just people and every documentary should be taken with a lot of salt. While the needs of presentation and entertainment are important and shouldn't be sacrificed at the altar of abstract formalisms, I think the presentation could often have some restraint or at least _remind_ people that a lot of stuff is theory. It is possible to marry dramatic displays with accuracy if one is willing to try.
155ad15be0e532a32808998981edbdf23d0ac1e9703f6bb08f5d663fd8b79565
['db7cd3cc7ffe4ff3890191e2eb9d041a']
Yes, you can extend the behaviour of the built-in applications. If you are using the pinax basic setup with user accounts and profiles, you will have to add the extra fields you want in apps/profiles/models.py. For a list of field types, see here: https://docs.djangoproject.com/en/1.3/ref/models/fields/ This will create the necessary db fields for you when you run manage.py syncdb. If you have already sync'd the db, however, you will have to manually add the db columns. If you don't have any data you care about in that table, you can always just drop the table and it will recreate it. Django doesn't modify db tables once they are created, even if you change the model. You will also have to modify the signup form to include these new fields and point your urls.py to the new signup form you created. Copy the form from the site-packages/pinax directory to your project. Don't modify them directly. If you haven't already, you should check out the Django tutorial here: https://docs.djangoproject.com/en/1.3/intro/tutorial01/ This will give you a good idea of how Django apps are put together and how the different pieces interact, so you can do a better job customizing Pinax to your liking. Make sure you know what models.py, urls.py, views.py, and the templates are doing.
7cdf5679ef1f76d8bfdaf346d09070db9460d6060017ac2ad0f7ecc160b1f12d
['db7cd3cc7ffe4ff3890191e2eb9d041a']
I have a list of strings that look like "funcname(arg, another_arg)*20 + second_func(arg1, arg2)" and I want to pull out just the args. I've tried the following: re.findall(r'\w[\w\d_]+(?!\()', string) however this returns ['funcnam', 'arg', 'another_arg', '20', 'second_fun', 'arg1', 'arg2'] Firstly, I'm a bit confused as to why I am seeing the '20', since I specified the string should start with a word character. Secondly, I'm wondering how I can improve my look-ahead to match what I'm looking for. I should note that some of the strings don't have functions and look like "value1 + value_two" so I can't simply search inside the parentheses.
08ecc34c8b0f586a8fef76aabd142a1353c9e0a82b6a76c1aedc5e1db399db08
['db81a13465764c258a09506adf55515c']
Also note how their sensor results are mostly oscillations at the natural frequency of their sensors. They got only a little bit of information about the shape of the electric field "wake" of the beam, and what little they got was made useless by their lack of knowledge of the shape of the beam itself.
9dc1753fadd6419a14ace514580a6e9483f73532741116994d623400920b4f59
['db81a13465764c258a09506adf55515c']
No, that is correct. I may have confused things with my proliferation of terminology. From a circuit measurement (ie most electrical engineering) perspective one can forget about the force that an inductor exerts on electrons and just treat the inductor as a resistor where the resistance is proportional to the rate of change of the current. The voltage drop across the inductor will be equal to the battery's voltage, so the current will increase at a constant rate.
031fcf9749500f22e18a73d78a1514e8c2efc01088475129cde73d0bb6069504
['db92182978444039859019583bb1926a']
I found the solution: (defun foo () (cond ((string= (minibuffer-prompt) "Regexp search: ") (insert "^\\*.*")))) (add-hook 'minibuffer-setup-hook 'foo) Press C-M-s and <return>, then the regexp ^\*.* will appear as the search pattern. Complement the full regexp (such as ^\*.*emacs) and <return>. Press C-M-s and C-s to search incrementally. References: Inserting Text into an Active Minibuffer https://superuser.com/questions/221829/in-emacs-why-can-i-not-paste-text-c-y-into-a-c-s-search-box
b8db3884da9ea50ddc8157b9484794f8de6ab044ae6d01d8dd047beff09a7032
['db92182978444039859019583bb1926a']
I want to implement one of the functions below with xbindkeys: Leader key function like vim: noremap <leader>1 iabc Or hotstring function like autohotkey: <IP_ADDRESS>\1<IP_ADDRESS> msgbox haha return I have googled the key words "xbindkeys leader", but there are no right answers. Anybody have any ideas? Thx in advance!
e23c5eb2102e1d053fd7f56b36ca1eeca84899e9082e182b6d474f960364f326
['dbbc7984465f4cdb931d7c1be27ba644']
The problem with the solution you offered is that "c" columns change depending on the content size; However, I would like the "29 column by 5 row fitting in a 5in line" table to be rigid. I should be able to merge columns/cells but the size each cell represents should never change. I can use my existing code by changing the left margin of the page because I will not need to show the cell borders. However, when two chars represent a single word, I do want to highlight bottom borders of a set of cells to show word groups in Chinese.
97ca69792551edeca0bef4a59fdab5d430694756ba0ac47e1d4c7bb51d7eadd2
['dbbc7984465f4cdb931d7c1be27ba644']
Hi <PERSON>, I am using this type of table to create a set of annotations for a Chinese sentence. The table will have 4 more rows in fact. ExPex package seemed to be for this kind of task but it assumes the words have spaces in between; Chinese chars do not have spaces in between in a sentence.
741812188b1c67e45d7a58bd39d0e6933096d4b79ff549598e27ebdc16e10ca6
['dbc735687d794a6884baf3a669f2393e']
Well I plan on doing a hard drive upgrade, so yes removing the hard drive is an option. Its a PowerPC G4. I'm contemplating just getting a firewire card for my PC, booting the mac in target mode and backing it up to a dmg with HFS Explorer (http://hem.bredband.net/catacombae/hfsx.html)
a8657fa85df14f98ae69fb1330f561e50f67906a8a85bad27840f5915b7f096b
['dbc735687d794a6884baf3a669f2393e']
You can use this to zip all files relative to the root of the build: **/* => artifacts.zip To zip all files relative to a folder named publish: publish/**/* => artifacts.zip If your published files are not included in the zip, they may have been published to someplace outside of the root of the build.
73335a48ce14e866f39588c57aea6207d5f13e6c44be6635f8d3dfacb2b5dbe9
['dbd5df2073304649b15b8e123f4fcec5']
You can use the onclick or onchange trigger events in order to send context change events to GA. I find it useful to use a helper function to achieve this. This function, which should be placed in the <head>, should populated with the relevant form name and context (this). <script> // helper function to trigger a Data Layer Form Event analyticsForm = function(f, el) { var formName = f; var elName = el.name || el.id || el.type; var category = 'interaction'; var action = 'form: ' + formName; var label = elName + ':' + el.type; // GA method of sending the event ga('send', 'event', category, action, label); // GTM method of sending the event window.dataLayer.push({ 'event': 'event', 'category': category, 'action': action, 'label': label }); } </script> Within the on-page code, the analyticsForm function can be called onchange of each field in a traditional form (including radio buttons or checkboxes) as shown below: <form> <input type="text" name="field1Name" onchange="analyticsForm('formName', this)"> <input type="text" name="field2Name" onchange="analyticsForm('formName', this)"> <select name="field3Name" onchange="analyticsForm('formName', this)"> <option value=""> </option> <option value="A">A </option> <option value="B">B </option> <option value="C">C </option> </select> <input type="checkbox" name="agree" value="false" class="checkbox" onclick="analyticsForm('formName', this)"> </form> In the above example, each time a text field or select field is changed or a checkbox or radio button is clicked, an event with the following structure will be called: Category: form Action: {{form name}} Label: {{element name/id}}:{{element type}}
7d9f758b73bacecfedcc255260457d4a9a953433f6e4590d3584247c90df7f64
['dbd5df2073304649b15b8e123f4fcec5']
It's not super clear in the documentation of findText, but the documentation for replaceText is more clear: The search pattern is passed as a string, not a JavaScript regular expression object. The example shown in the documentation of replaceText shows that your 3rd example is the correct one (where the search for a is shown as just the string, "a". body.replaceText("^.*Apps ?Script.*$", "Apps Script"); Obviously, String.search() will work here as well, but if you're looking to manipulate the attributes of the text, rather than just the string contents, using the built-in javascript function might leave you hanging.
6916dc4e0e07f568aac8e84058d713d4d73d189ac79438c6ec2af88bffc1fa91
['dbd6862cb42e4b49a1412c390d6f95b1']
I have a e-commerce (PHP) system. And it is working now. I decided to allow non-members can order. I'm using session for userid. And i'm storing data in database. But how can i do it for non-members ? Using Cookie or Session. I couldn't decide it. What is your offer ? Should i store all data in cookie ? Or in database ?
0d80b83ca6e5a30694fbbc9b74f7fd102d37585bddca969d50cac8bf075d5cb0
['dbd6862cb42e4b49a1412c390d6f95b1']
I wrote a new database class function public function queryColumn($index = NULL){ $index = (isset($index)) ? intval($index) : 0; $this->execute(); return $this->_sql->fetchAll(PDO<IP_ADDRESS>FETCH_COLUMN,$index); } And i edited my function public function get_product_image_path($productid){ $sql = "SELECT picture FROM ".PREFIX."product_picture WHERE product_id = :id"; $this->query($sql); $this->bind(':id', $productid); if ($this->rowCount() > 0) return $this->queryColumn(); else return NULL; } Hence, i manage to merging arrays.
429e1e19726170a8b249bf9ea5b5ff7c8d930a51e7ae56ccbe805c0e718ec15b
['dbdb8709d8d948cc8020f770a9578c8c']
OK, I solved the problem myself. The problem is that my third-party library only provides a .so file for armeabi-v7a, whereas OpenCV has a bunch of other folders for different systems. If one copies all the folders to jniLibs, Android would expect the folders other than armeabi-v7a to have the same .so files. So it complained and stopped the app. The solution is to remove all the other folders from OpenCV from the jniLibs folder and keep only armeabi-v7a.
c4c86d70885293723dbc2f217bf42b4fc5df56ef1e8a628cdccaeededd4329a8
['dbdb8709d8d948cc8020f770a9578c8c']
In case anyone needs it, here is a working example as per <PERSON>'s suggestion. panel.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(final MouseEvent e) { final Border border = panel.getBorder(); if (border instanceof TitledBorder) { final TitledBorder tb = (TitledBorder) border; final FontMetrics fm = panel.getFontMetrics(panel.getFont()); final int titleWidth = fm.stringWidth(tb.getTitle()) + 20; final Rectangle bounds = new Rectangle(0, 0, titleWidth, fm.getHeight()); if (bounds.contains(e.getPoint())) { // YOUR BUSINESS LOGIC } } } });
086de8866c55ff94a50b5c50afb39cd6ee0cdd13b87a7f2044f0e31cd7d68f98
['dbdc08b49fd944b1a0adf2558ce1616a']
I have an array of 4 objects and each object contains property array of 8 object. I am trying to remove an object from properties Array[8] var responseArray = new Array(); responseArray = response.data; responseArray.forEach(function (resProp) { if (resProp.alias == "General Details") { resProp.properties.forEach(function (checkProp) { if (checkProp.alias == "name") { responseArray.pop(checkProp); } }); } }); I am able to pop it however the responseArray having only 3 object Array instead of 4.i think, this code is removing the whole 4th object. responseArray.pop(checkProp); any suggestions on removing only matched object?
2f79e7079ecc3769f58c8dbcaf2625298eca1efbc8e75884253e73af35ea74f1
['dbdc08b49fd944b1a0adf2558ce1616a']
I have an object which contains 2 properties and array of 4 objects($scope.details) I am trying to append a new object as a property to $scope.details. this is the way i am trying: var routeId; var obj=new Object(); obj.routeId = $routeParams.id; $scope.details = obj; however not getting results. any suggestion on this?
6a0235e663ad8fac1044984ef2d28373dfc568e9f5748e1362d0a506dc560fbe
['dbe0839354ae4b4489d318ebaa83c00e']
You may have a look at dask, it is designed for the analysis of big data sets, supports pandas and has comes with multi threading support. I tested it on an extended version of you example (21x18) it showed a small reduction in computing time. correlation_analysis w/o dask 0.767 sec correlation_analysis w dask 0.707 sec dask also provides it's own routine for correlation calculation https://docs.dask.org/en/latest/array-api.html?#dask.array.corrcoef . If the two variables you want to correlate (_p, _l) are in two dataframes, do you need to concatenate them? Looping over both dataframes instead of one merged reduced the computing time as well. def correlation_analysis2(lncRNA_PC_T): """ Function for correlation analysis """ correlations = pd.DataFrame() for p in df1: for l in df2: correlations = correlations.append(pd.Series(pearsonr(df1[p],df2[l]),index=['PCC', 'p-value'],name=p + '_' + l)) correlation_analysis with 2 df 0.723 sec You may look at https://numpy.org/doc/stable/reference/arrays.nditer.html how you can optimize your loops further. Further possibilities might be to use of some JIT compiler (i.e. pypy or numba), but the effect might only be visible in larger test samples.
11fdafa7004fdf5e10bb4b03fb53da094bbbb589d1ffeafcdd0c05a7ed43d394
['dbe0839354ae4b4489d318ebaa83c00e']
After the first good results with pythran, I tried transonic to benefit form the jit and the class support. Unfortunately it does not run as expected. If I use the @jit decorator the decorated functions are compiled and cached, but during the first run of the code the compiled version is not used, instead the function is processed by python. After the first run the cached version is used. If I use the @boost decorator and run transonic runmwe.py a compiled version is created in the __pythran__ folder, but running the script with python runmwe.py I receive the following warning and the code is processed by python. WARNING: Pythran file does not seem to be up-to-date: <module '__pythran__.runmwe_920d6d0a5cd396436d463468328e997b' from '__pythran__/runmwe_920d6d0a5cd396436d463468328e997b.cpython-38-x86_64-linux-gnu.so'> Rerunning transonic runmwe.py just produces a warning that the code is already up-to-date. Do I miss some configuration to use @jit and @boost properly or is this the expected behavior and I use transonic the wrong way? Used software from conda-forge: transonic 0.4.5 pythran 0.9.7 python 3.8.6 MWE: import numpy as np from transonic import jit,boost #transonic def looping(float[]) @boost def looping(np_array): shape_x =np_array.shape[0] for x in range(shape_x): if np_array[x] < 0.5: np_array[x] = 0 else: np_array[x] = 1 return np_array in_arr = np.random.rand(10**7) looping(in_arr)
500d3667b7d93592162909c330e71e04d649c417747647caa538527c4ecb74e8
['dbf8e95528f3479aa86a5fb335b86b13']
I'm building a Django app in which I need to represent gender (male/female) for all users. A single user can select that they are interested in males, females, or both. This data will then be used to cross-reference with other users to find similarities. A ManytoManyField for gender will clearly work, but since gender is a fairly static field that will only have two options, is there a better way to implement this? Is there some sort of multiple-selection capable field that doesn't require the database overheard of a m2m field?
5faf323412015b873a3bc55b0350abfa3fce9081d653db36adbb1a2af3625558
['dbf8e95528f3479aa86a5fb335b86b13']
With the old pickle-based sessions, a known SECRET_KEY could lead to privilege escalation/remote code execution exploits. However, with the new JSON session serializer in Django 1.6 this is no longer the case. So what's the worst thing that could happen if someone found my app's SECRET_KEY, assuming I'm running Django 1.6+?
3c5693de7874de9d2511afc539c76ce3b20e3cc921e80f68ece34d08ee5c3137
['dbfeb525f0df4d6a9fc9caccd7ea2543']
I have a form where I upload three different files. Also I have two input fields for all file uploads where I store some information on file upload. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"> . </script> <div> <input type="file" class="file_name" name="file_name[]"onchange="getFileData(this);" /> <input type="text" class="file_name_helper" name="file_name_helper[]"/> <input type="text" class="duration" name="duration[]"/> </div> <div> <input type="file" class="file_name" name="file_name[]" onchange="getFileData(this);" /> <input type="text" class="file_name_helper" name="file_name_helper[]" /> <input type="text" class="duration" name="duration[]"/> </div> <div> <input type="file" class="file_name" name="file_name[]" onchange="getFileData(this);"/> <input type="text" class="file_name_helper" name="file_name_helper" /> <input type="text" class="duration" name="duration[]"/> </div> <script type="text/javascript"> function getFileData(myFile){ var file = myFile.files[0]; var filename = [file.name]; $(myFile).next("input[name='file_name_helper[]']").val(filename); $("input[name='duration[]']").val("duration"); } </script> The problem is that when I upload the form, the first field "file_name_helper" gets populated correctly with the selector that I have but when I do the same for the "duration" field it doesn't work. How can I choose the specific duration field? Any help would be appreciated
fc98d361317be5f9554dad0cfad211998f90b8ca28c1aa099c30e9c7f2c8deb9
['dbfeb525f0df4d6a9fc9caccd7ea2543']
I have an exec() command on my code which runs an applescript from the desktop $cmd = "osascript /Users/***/Desktop/script.app"; exec($cmd, $output); print_r($output); On one computer it runs without errors, on the second computer it returns an empty array. They are exactly at the same directory, except the username which I change it to the correct one. I also checked the file permissions. I would appreciate it if someone could shed some light on this one.
e8783997802393a4ea9e08c48615d1df989df42378169bbe012f2073cea0902d
['dc0d9d0d98be4e73b2fda156bdd5f8be']
Hello I am new to javascript and jquery. I am trying to show the form when I choose "edit", however I cannot make it work. Any help/advise is appreciated. php code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Manage Categories</title> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> <script type="text/javascript" src="test.js"></script> </head> <body> <h1>Manage Categories</h1> <h3>List of current categories: </h3> <ul> <table> <?php $counter = 0; while($category = $categories->fetch_assoc()){ if($category['name'] === "+ New Category"){ continue; } ?> <tr> <td> <li> <?php echo $category['name']?>&nbsp; <a id="link<?php echo $counter ?>" href="manage_categories.php?type=edit&id=<?php echo $category['id'];?>">Edit</a>&nbsp;&nbsp; <a href="manage_categories.php?type=delete&id=<?php echo $category['id'];?>">Delete</a> </li> </td> </tr> <div id="edit_form<?php echo $counter ?>"> <form action="manage_categories.php?type=edit&id=<?php echo $category['id'];?>" method="POST"> <tr id="abc"> <td>New category name:</td> <td><input type="text" name="new_cat" /></td> <td><input type="submit" name="submit" value="Change" /></td> </tr> </form> </div> <?php $counter++; } ?> <form action="manage_categories.php?type=add" method="POST"> <tr> <td><a href="manage_categories.php?type=add">Add New Category</a></td> </tr> <tr> <td>New category name: </td> <td><input type="text" name="new_cat" /></td> <td><input type="submit" name="submit" value="Add" /></td> </tr> </form> </table> </ul> <a href="<?php echo $journal_url ?>">Return to journal homepage</a> </body> </html> js file: $(document).ready(function () { $("#edit_form1").hide(); $("#link1").on("click", function(){ alert("hello"); if($("#edit_form1").is(":visible")){ $("#edit_form1").hide(); } else { $("#edit_form1").show(); } }); $("#link2").on("click", function(){ alert("hello"); $("#edit_form2").hide(); }); }); The alert() function works but I just cannot hide/show the form (it is shown by default). The php script just returns a list of categories that I have in the database.
28bd3e8716005f56da0c67cdb35461185d1dc2930d3a4469643095d78d01d69e
['dc0d9d0d98be4e73b2fda156bdd5f8be']
It works fine until you get to i = 5 for the second loop. When i = 5, a[b[5]] is undefined because b[5] is uninitialized. After the first loop, you have b[] = {1, 3, 5, 7, 9, ....} the rest is uninitialized. Try to initialize b[10] and it should work. b[10] = {};
c7586cedacc93cd409452287847be935f928fadcc206e113c297fcce850ced77
['dc0e70f70c564f789fa8d618a611be58']
The question of own death (the end of own existence) must be clearly and completely answered to know the answer to the last "why". And of course, you cannot be sure the answer is right while the answer is not checked. Right? So, the last question will be "Why did the existence ended?". Can it be answered? It cannot be answered (correctly) as nobody can check it.
e12a521d91996abf31651b0f767d3c36d537468adbd3d31f9e8223e84748abd4
['dc0e70f70c564f789fa8d618a611be58']
I'm looking for a database of font information, specifically limited to those found on Linotype. For example, given the typeface CRONOS, I'd like to be able to know if it is: (sans/slab) serif? monospaced? display? script? I can certainly look at a font by hand and decide this for myself, but I'd like a a database or tool out there that determines this. I've looked at the Linux program otfinfo but it does not give any of this information.
7fd6783ae226ef7d34c143e5a7255c88e65cb414c353bbde21a2245352157ea3
['dc1cf4911eb54e1b9a7517a536f883d4']
I've had a similar situation with a $12 check deposited electronically into my Ally checking account. Whatever automated process there is running on their side flagged the check as being written out to 2 individuals but only having one signature so they rejected the deposit sometime within 7 days. I just had to get my wife to sign it and then resubmitted it. Not sure how they handle it with a physical check but assuming they don't mark it as rejected or invalid you should be able to just get it fully signed and deposited.
eb31f5522e17c80fc636f598f1dc0a7b9d3c658a64601fb32dd5e5bcd0920af0
['dc1cf4911eb54e1b9a7517a536f883d4']
Open the view in Sharepoint designer Locate the "List view tools" bar and select "Design". Click "Customize XSLT" then select "Customize entire view" Find this line of code xsl:when test="$Position mod 2 = 0" and update it as you need. For instance: If you need to display 4 columns instate of 2 then, replace the line of code by the following: xsl:when test="$Position mod 4 = 0"