qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
33,994,408
I am trying to send notification in two line when the message text is long I have tried this : ``` Message message = new Message.Builder().timeToLive(30) .delayWhileIdle(true).addData("message", msg).build(); ``` when the text "msg" contain more char then then notification shows as message: this is a n...
2015/11/30
[ "https://Stackoverflow.com/questions/33994408", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2282655/" ]
Try this: ``` NotificationManager notificationManager = getNotificationManager(); PendingIntent pi = getPendingIntent(); Builder builder = new Notification.Builder(this); builder.setContentTitle(title) .setContentText(message) .setSmallIcon(R.drawable.ic_launcher...
I did it like:- ``` Message message = new Message.Builder() .timeToLive(30) .delayWhileIdle(true) .addData("title", msgTitle) .addData("text", msgText) .build(); ``` And in...
33,994,408
I am trying to send notification in two line when the message text is long I have tried this : ``` Message message = new Message.Builder().timeToLive(30) .delayWhileIdle(true).addData("message", msg).build(); ``` when the text "msg" contain more char then then notification shows as message: this is a n...
2015/11/30
[ "https://Stackoverflow.com/questions/33994408", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2282655/" ]
Try this: ``` NotificationManager notificationManager = getNotificationManager(); PendingIntent pi = getPendingIntent(); Builder builder = new Notification.Builder(this); builder.setContentTitle(title) .setContentText(message) .setSmallIcon(R.drawable.ic_launcher...
You cannot specify from Message how many lines the notification will use when displayed. Android displays the text passed to it as is. Even if you are able to define how many lines the notification uses, that will have to be done on the Android side not the server side. Generally you don't have control over how many l...
549,297
Say you type in passwd and you enter in the wrong password. There's a noticeable delay between when it tells you that the password was bad and when you enter it. Any ideas as to why? Seems kinda strange... Here's the message I'm getting when I enter in a bad password is as follows: ``` passwd: Authentication token ma...
2013/02/10
[ "https://superuser.com/questions/549297", "https://superuser.com", "https://superuser.com/users/172193/" ]
Yes, the delay is a protection against brute force, and is around 3 seconds. The reason why it doesn't appear in the passwd man, is because it is controlled by the authentication backend - usually `pam`. ``` man pam_unix ``` Shows you can set a `nodelay` to eliminate the delay. You can also set applications specifi...
Yes, this is to prevent brute force attacks. An alphanumeric 6 character password can have up to 36 bits of entropy (6 bits per character). If a computer can check 1 billion passwords per second, it will need only `2 ^ 36 / 1 billion = 69` seconds to try all possible passwords. A delay of one second means that only on...
36,240,817
``` class MyClass(object): next_number = 0 def __init__(self): self.number = self.next_number MyClass.next_number += 1 class MyClassA(MyClass): pass ``` Above it would appear I am forced hardcode the class name when updating the class variable on line 6 since writing: ``` self.__class__...
2016/03/26
[ "https://Stackoverflow.com/questions/36240817", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3235250/" ]
You are correct that `self.__class__.next_number` would create a variable for each class that instantiate an object that calls this `__init__`. You have 2 choices: hard code the class name as you did, or do not call `super().__init__` from the derived class. I would go with the former. In my opinion, you are unneces...
``` class MyClass(object): next_number = 0 def __init__(self): self.number = self.__class__.next_number self.__class__.next_number += 1 class MyClassA(MyClass): pass a = MyClassA() print a.next_number b = MyClassA() print a.next_number, b.next_number print a.number, b.number ``` output ...
36,240,817
``` class MyClass(object): next_number = 0 def __init__(self): self.number = self.next_number MyClass.next_number += 1 class MyClassA(MyClass): pass ``` Above it would appear I am forced hardcode the class name when updating the class variable on line 6 since writing: ``` self.__class__...
2016/03/26
[ "https://Stackoverflow.com/questions/36240817", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3235250/" ]
One way to dodge around the issue of rebinding the class variable is to replace the immutable integer value with an mutable object that contains the number inside it. You can then mutate the object in place. A simple version of this is to put the number in a one-element list: ``` class MyClass(object): next_numbe...
You are correct that `self.__class__.next_number` would create a variable for each class that instantiate an object that calls this `__init__`. You have 2 choices: hard code the class name as you did, or do not call `super().__init__` from the derived class. I would go with the former. In my opinion, you are unneces...
36,240,817
``` class MyClass(object): next_number = 0 def __init__(self): self.number = self.next_number MyClass.next_number += 1 class MyClassA(MyClass): pass ``` Above it would appear I am forced hardcode the class name when updating the class variable on line 6 since writing: ``` self.__class__...
2016/03/26
[ "https://Stackoverflow.com/questions/36240817", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3235250/" ]
You are correct that `self.__class__.next_number` would create a variable for each class that instantiate an object that calls this `__init__`. You have 2 choices: hard code the class name as you did, or do not call `super().__init__` from the derived class. I would go with the former. In my opinion, you are unneces...
``` class Test(object): next_number = 0 def __new__(cls, *args, **kwargs): cls.next_number += 1 instance = super(Test, cls).__new__(cls) instance.next_number = cls.next_number return instance ``` Each Test() **call** method invoke class **new** method which as constructor retu...
36,240,817
``` class MyClass(object): next_number = 0 def __init__(self): self.number = self.next_number MyClass.next_number += 1 class MyClassA(MyClass): pass ``` Above it would appear I am forced hardcode the class name when updating the class variable on line 6 since writing: ``` self.__class__...
2016/03/26
[ "https://Stackoverflow.com/questions/36240817", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3235250/" ]
One way to dodge around the issue of rebinding the class variable is to replace the immutable integer value with an mutable object that contains the number inside it. You can then mutate the object in place. A simple version of this is to put the number in a one-element list: ``` class MyClass(object): next_numbe...
``` class MyClass(object): next_number = 0 def __init__(self): self.number = self.__class__.next_number self.__class__.next_number += 1 class MyClassA(MyClass): pass a = MyClassA() print a.next_number b = MyClassA() print a.next_number, b.next_number print a.number, b.number ``` output ...
36,240,817
``` class MyClass(object): next_number = 0 def __init__(self): self.number = self.next_number MyClass.next_number += 1 class MyClassA(MyClass): pass ``` Above it would appear I am forced hardcode the class name when updating the class variable on line 6 since writing: ``` self.__class__...
2016/03/26
[ "https://Stackoverflow.com/questions/36240817", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3235250/" ]
One way to dodge around the issue of rebinding the class variable is to replace the immutable integer value with an mutable object that contains the number inside it. You can then mutate the object in place. A simple version of this is to put the number in a one-element list: ``` class MyClass(object): next_numbe...
``` class Test(object): next_number = 0 def __new__(cls, *args, **kwargs): cls.next_number += 1 instance = super(Test, cls).__new__(cls) instance.next_number = cls.next_number return instance ``` Each Test() **call** method invoke class **new** method which as constructor retu...
100,239
I have a mail account like xx@me.com. Due to slow working and non-responding computer, I accidentally erased my inbox and trash on iCloud. Is there any option that I can recover them?
2013/08/28
[ "https://apple.stackexchange.com/questions/100239", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/55976/" ]
You say "computer" but don't specify what, I will assume that you mean you have a Mac also, in which case, on the assumption that you run Time Machine (please, *everyone*, **make backups!**) then offline copies should be in your backups.
Try logging into icloud.com with your Apple ID and password. If the messages are no longer there, then there is no recovery option.
38,571,517
I've created an AlertDialog with an EditText in my Android app, but the default margins look really off. I've tried to specify margins as follows: ``` android.support.v7.app.AlertDialog.Builder builder = new android.support.v7.app.AlertDialog.Builder(SpinActivity.this); builder.setTitle("Edit Spin Tags"...
2016/07/25
[ "https://Stackoverflow.com/questions/38571517", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1720985/" ]
You can have a `LinearLayout` as parent of the `EditText`. Then provide the margin to the `EditText`. ``` private void createDialog() { AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle("Demo"); builder.setMessage("Some demo message"); LinearLayout parentLayout = new LinearL...
Define your Edittext in a different layout file while setting proper margins in that layout. Inflate that layout and then set it as view for dialog.
38,571,517
I've created an AlertDialog with an EditText in my Android app, but the default margins look really off. I've tried to specify margins as follows: ``` android.support.v7.app.AlertDialog.Builder builder = new android.support.v7.app.AlertDialog.Builder(SpinActivity.this); builder.setTitle("Edit Spin Tags"...
2016/07/25
[ "https://Stackoverflow.com/questions/38571517", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1720985/" ]
Actually your solution is working perfectly, except that `builder.setView(input, margin, 0, margin, 0);` takes arguments in "pixel" values. So a value of 20 is very small. Either use a higher value for margin e.g. in the 100s. or use this function to convert from dp to pixels ``` public static int dpToPx(int dp) { ...
Define your Edittext in a different layout file while setting proper margins in that layout. Inflate that layout and then set it as view for dialog.
38,571,517
I've created an AlertDialog with an EditText in my Android app, but the default margins look really off. I've tried to specify margins as follows: ``` android.support.v7.app.AlertDialog.Builder builder = new android.support.v7.app.AlertDialog.Builder(SpinActivity.this); builder.setTitle("Edit Spin Tags"...
2016/07/25
[ "https://Stackoverflow.com/questions/38571517", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1720985/" ]
Actually your solution is working perfectly, except that `builder.setView(input, margin, 0, margin, 0);` takes arguments in "pixel" values. So a value of 20 is very small. Either use a higher value for margin e.g. in the 100s. or use this function to convert from dp to pixels ``` public static int dpToPx(int dp) { ...
You can have a `LinearLayout` as parent of the `EditText`. Then provide the margin to the `EditText`. ``` private void createDialog() { AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle("Demo"); builder.setMessage("Some demo message"); LinearLayout parentLayout = new LinearL...
486,407
I have a switching MOSFET circuit. Input to the switching MOSFET circuit is 11V at the drain. The gate is connected to a function generator. 5V peak-peak, frequency = 1kHz, 1ms (time period) & 90% duty cycle. MOSFET Circuit (MOSFET IC Part Number : [VN7140AJ)](https://www.st.com/resource/en/datasheet/vn7140aj.pdf) :...
2020/03/16
[ "https://electronics.stackexchange.com/questions/486407", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/220456/" ]
So when the gate turns off and the source goes high impedance, you've got a **47uF capacitor** and a **100mA current sink** as the load. We can ignore the left half of the circuit because the capacitances are so small in comparison. Over the 100us drop-out the load will draw out 100us\*0.1A = 10uC of charge from the ...
In the case when you connect the MOSFET to the load circuit try adding a 220 or 470 ohm resistor across C101/C102. In other words put the resistor from MOSFET source to GND. Then observe the difference in the switching waveform.
486,407
I have a switching MOSFET circuit. Input to the switching MOSFET circuit is 11V at the drain. The gate is connected to a function generator. 5V peak-peak, frequency = 1kHz, 1ms (time period) & 90% duty cycle. MOSFET Circuit (MOSFET IC Part Number : [VN7140AJ)](https://www.st.com/resource/en/datasheet/vn7140aj.pdf) :...
2020/03/16
[ "https://electronics.stackexchange.com/questions/486407", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/220456/" ]
So when the gate turns off and the source goes high impedance, you've got a **47uF capacitor** and a **100mA current sink** as the load. We can ignore the left half of the circuit because the capacitances are so small in comparison. Over the 100us drop-out the load will draw out 100us\*0.1A = 10uC of charge from the ...
Your first circuit makes no sense. (sorry to be harsh) As (hand) drawn, the only thing that the Nfet can do is to short 11V to ground. The rest of the circuit won't matter, ground is ground. From your waveforms I expect that the fet is actually a P channel mosfet and is not connected to ground. (going out on a limb ...
486,407
I have a switching MOSFET circuit. Input to the switching MOSFET circuit is 11V at the drain. The gate is connected to a function generator. 5V peak-peak, frequency = 1kHz, 1ms (time period) & 90% duty cycle. MOSFET Circuit (MOSFET IC Part Number : [VN7140AJ)](https://www.st.com/resource/en/datasheet/vn7140aj.pdf) :...
2020/03/16
[ "https://electronics.stackexchange.com/questions/486407", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/220456/" ]
So when the gate turns off and the source goes high impedance, you've got a **47uF capacitor** and a **100mA current sink** as the load. We can ignore the left half of the circuit because the capacitances are so small in comparison. Over the 100us drop-out the load will draw out 100us\*0.1A = 10uC of charge from the ...
Putting aside for the moment your circuit, which should either use a P-MOSFET as a switch or a higher driver voltage for the N-MOSFET, based on your question and comments (and as requested), what you are really interested in, is to determine how long your pre-charged output capacitor can hold its voltage during a volta...
24,745,976
Im writing a program where I need two different .cpp files, the first with my main and second with a few functions that are to be used in the main. Do I also need a header file for initialization? Not too sure how to go about the #includes.. any help is appreciated!
2014/07/14
[ "https://Stackoverflow.com/questions/24745976", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3641836/" ]
When you want to use multiple `.cpp` files - * The `.h` file will basically be used to link the `.cpp` files together. * You would put your function declarations in the `.h` file. * You would include the `.h` file in your main `.cpp` file. * You would write your functions in your functions `.cpp` file and also include...
This should suit you. Your `main.cpp` file: ``` // main.cpp #include "header.h" // bring in the declarations // some function that performs initialization. // it is static so it cannot be seen outside of this compilation unit. static void init_function() { } // initialization functions etc. here int main(int argc,...
29,192
I had some old super 8mm film digitized, and the result looks almost right. I did a little poking around and I'm wondering if they squished the film into a standard (but wrong) aspect ratio. The resulting video files claim to be 720x480 which would be a ratio of 1.5, but according to [Wikipedia](https://en.wikipedia.o...
2020/01/02
[ "https://avp.stackexchange.com/questions/29192", "https://avp.stackexchange.com", "https://avp.stackexchange.com/users/10919/" ]
If the video file has subtitles (even fake ones, even not being displayed), you can go to View -> Subresync (or hit Ctrl + 6) and you'll see the timecode in the status bar displayed as {Hour:Minute:second.frame}. As yet, I haven't found how to make this display format permanent, to appear even without a subtitle track....
Go to MPC settings, External filters, Add filter `ffdshow Video Decoder`. Move it to the top of the list and set it to `Prefer`. Then double click it to open its settings. Check `OSD` (On-Screen-Display) then check `Current Frame`. You can easily enable and disable to revert to your normal decoder by unchecking the b...
220,578
I'm not sure whether this is off-topic; if so, I do apologize and will fully understand votes to close. That said: I live in a climate that's quite cold much of the year but gets pretty hot in the summer, so I have both heating and cooling to worry about. I'm about to replace my roof and am trying to figure out how mu...
2015/11/26
[ "https://physics.stackexchange.com/questions/220578", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/4993/" ]
John G. Cramer discussed G4V in a recent Analog Alternate View Column (Mar. 2016), and how Advanced LIGO data could possibly falsify G4V, General Relativity or even both of them (Their predicted gravity wave signatures signatures differ.) Cramer also stated that there would be no dark energy since G4v explains distant...
Gravity is assumed to be attractive only. the cosmoconst/dark energy is Assumed to exist in order to explain the observed accelerating expansion.
220,578
I'm not sure whether this is off-topic; if so, I do apologize and will fully understand votes to close. That said: I live in a climate that's quite cold much of the year but gets pretty hot in the summer, so I have both heating and cooling to worry about. I'm about to replace my roof and am trying to figure out how mu...
2015/11/26
[ "https://physics.stackexchange.com/questions/220578", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/4993/" ]
Carver Mead's version of the G4V theory includes a 2nd order term in the equation for inertial momentum which is proportional to the integral of the velocity of all relativistic energy in the universe divided by its distance from the body of interest. The term is expressed as being proportional to the inertial vector p...
Gravity is assumed to be attractive only. the cosmoconst/dark energy is Assumed to exist in order to explain the observed accelerating expansion.
220,578
I'm not sure whether this is off-topic; if so, I do apologize and will fully understand votes to close. That said: I live in a climate that's quite cold much of the year but gets pretty hot in the summer, so I have both heating and cooling to worry about. I'm about to replace my roof and am trying to figure out how mu...
2015/11/26
[ "https://physics.stackexchange.com/questions/220578", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/4993/" ]
John G. Cramer discussed G4V in a recent Analog Alternate View Column (Mar. 2016), and how Advanced LIGO data could possibly falsify G4V, General Relativity or even both of them (Their predicted gravity wave signatures signatures differ.) Cramer also stated that there would be no dark energy since G4v explains distant...
Carver Mead's version of the G4V theory includes a 2nd order term in the equation for inertial momentum which is proportional to the integral of the velocity of all relativistic energy in the universe divided by its distance from the body of interest. The term is expressed as being proportional to the inertial vector p...
54,434,100
I'm trying to use a regex to parse enums that are lower case, for example: ``` enum TransparencyState { Gone, Translucent, Opaque } ``` or ``` enum TransparencyState { gone, translucent, opaque } ``` However, the closest I can get is `(?:enum\s+[a-zA-Z0-9]+\s*\{|\G)\s+...
2019/01/30
[ "https://Stackoverflow.com/questions/54434100", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5162375/" ]
Try this regex: ``` ^enum[^{]*{\s*(?!\b[A-Z]+\b)(\w+(?:\s*,\s*(?!\b[A-Z]+\b)\w+)*)\s*} ``` **[Click for Demo](https://regex101.com/r/ZqGV7i/5)** In JAVA, escape each `\` with another `\` **Explanation:** * `^` - asserts the start of the line * `enum[^{]*{\s*` - matches `enum` followed by 0+ occurrences of any cha...
Since you tagged checkstyle in this, you can use a custom check from [sevntu](https://github.com/sevntu-checkstyle/sevntu.checkstyle) to enforce a specific naming convention for your enumeration constants. No complex regular expression required. ``` <module name="EnumValueNameCheck"> <property name="format...
5,103,873
Let's say I have an image in a CBitmap with a color that signifies a transparent pixel (in my case it's magenta). Can I create a HRGN or a CRgn for the image that includes all the pixels except the magenta ones?
2011/02/24
[ "https://Stackoverflow.com/questions/5103873", "https://Stackoverflow.com", "https://Stackoverflow.com/users/492336/" ]
i have use a different approach for getting the sender button of my context menu. i have made an event on the "hold\_click" where i have get back the content of the button in a public string ``` private void GestureListener_DoubleTap(object sender, GestureEventArgs e) { Button clikance = (Button)sender; Butt...
If you look in the debugger at the point where the exception is raised, you'll see that **sender** isn't a `Button`, so trying to do an explicit cast to `Button` will obviously throw an `InvalidCastException`. You can use the `VisualTreeHelper` to walk up the tree from your actual sender to the `Button` element: ```...
5,103,873
Let's say I have an image in a CBitmap with a color that signifies a transparent pixel (in my case it's magenta). Can I create a HRGN or a CRgn for the image that includes all the pixels except the magenta ones?
2011/02/24
[ "https://Stackoverflow.com/questions/5103873", "https://Stackoverflow.com", "https://Stackoverflow.com/users/492336/" ]
i have use a different approach for getting the sender button of my context menu. i have made an event on the "hold\_click" where i have get back the content of the button in a public string ``` private void GestureListener_DoubleTap(object sender, GestureEventArgs e) { Button clikance = (Button)sender; Butt...
Use the Tag property of the MenuItem to retrieve your Button : ``` // Object creation Button myButtonWithContextMenu = new Button(); ContextMenu contextMenu = new ContextMenu(); MenuItem aMenuItem = new MenuItem { Header = "some action", Tag = myButtonWithContextMenu, // tag contains the button }; // Events ...
49,932,694
My code below works to delete the SAME data dump. I want to make it work for varying sizes of data. I just need to filter for Column A where cell = 2 and while that is filtered, filter Column AS for all numbers that are 11 AND Greater. I cant figure out how to input that into the "criterial:=Array(\_) portion: View m...
2018/04/20
[ "https://Stackoverflow.com/questions/49932694", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7587176/" ]
This will use `ActiveSheet` * If col `A` contains cells with values `= 2` it will AutoFilter it: `Col A = 2`, * If col `AS` contains cells with values `> 10` it will AutoFilter it: `Col AS > 10` * Delete all remaining visible rows starting with `START_DEL_ROW` --- ``` Option Explicit Public Sub FilterAndDelete() ...
you could use this ``` With Intersect(ActiveSheet.UsedRange, Range("A:AS")) ' reference its columns A:AS range .AutoFilter Field:=1, Criteria1:="2" ' filter referenced range column 1 cells with "2" .AutoFilter Field:=.Columns.Count, Criteria1:=">11" ' filter referenced range last column with ">11...
24,581
Can anyone please tell me, which variable holds the hash of the solution of block's PoW in broadcasted block? I know that a block consists of (I am pretty sure I am forgetting some variables here): * Magic no * Block size * Transactions (raw) * Transactions counter * Block header + version + hash of previous block ...
2014/04/13
[ "https://bitcoin.stackexchange.com/questions/24581", "https://bitcoin.stackexchange.com", "https://bitcoin.stackexchange.com/users/13358/" ]
It is not stored. The proof of work is in the fact that the hash of your generated block should be of a certain form. It does not make sense to store it either, because you cannot trust it to be the real hash of the block and thus should be calculated anyway.
It is not stored as part of the block data itself. Other clients reply with their list of hashes ahead of yours when you broadcast getblocks. From that list, each block header is downloaded and kept in the local block chain leveldb with the hash as a key. From [Bitcoin Wiki](https://en.bitcoin.it/wiki/Network#Initial_...
7,297,554
I have an input with the type set as "date" (html5): ``` <input id="Employee_hireDate" class="pickDate" type="date" name="Employee[hireDate]" value="Hire Date" /> ``` When I view the raw source, the type is set as date. However, in Chrome Developer Tools it is not displayed. And when I run: ``` alert($('#Employee_h...
2011/09/04
[ "https://Stackoverflow.com/questions/7297554", "https://Stackoverflow.com", "https://Stackoverflow.com/users/756558/" ]
You really should not do this, this way. HTML5 date has some very specific UI and a very specific API. For example the following code <http://jsfiddle.net/trixta/EAZPN/> does not work in Opera and it won't be working in Chrome or any other browser, if the browser has implemented type="date" fully. If you want to make ...
If you check out the JSFiddle from RC's comment, and switch versions of jQuery around, you'll find you only get the correct answer ("date") with jQuery 1.6.2 or later. Make sure you're using the latest version of jQuery!
32,123
I have replaced old Cisco 1900 switches with 3850's in my plant process areas. Added Fiber links between 3850's for increased performance. I can't get data transfer through the fiber uplinks. I have assigned some of the LAN ports to the different VLANS and they are communicating correctly. The Gib Fiber ports when...
2016/06/09
[ "https://networkengineering.stackexchange.com/questions/32123", "https://networkengineering.stackexchange.com", "https://networkengineering.stackexchange.com/users/27032/" ]
Make sure the module is recognized by the switch. Issue: **show inventory** Stack1#sh inv NAME: **"Switch 1 FRU Uplink Module 1", DESCR: "2x1G 2x10G Uplink Module"** PID: C3850-NM-2-10G , VID: V01 , SN: XXX NAME: "Te2/1/1", DESCR: "SFP-10GBase-SR" PID: SFP-10G-SR , VID: V03 , SN: XXX If the Uplink module is not re...
The 1900 switch has 100-fx ports, which as the name implies, is 100 Mb. The Gigabit fiber ports can't operate at that speed.
32,123
I have replaced old Cisco 1900 switches with 3850's in my plant process areas. Added Fiber links between 3850's for increased performance. I can't get data transfer through the fiber uplinks. I have assigned some of the LAN ports to the different VLANS and they are communicating correctly. The Gib Fiber ports when...
2016/06/09
[ "https://networkengineering.stackexchange.com/questions/32123", "https://networkengineering.stackexchange.com", "https://networkengineering.stackexchange.com/users/27032/" ]
Cisco 3850 Series Switch is a 10-Gbps network switch, which means you need to use 10G SFP+ optical module or under 10G optical module, such as 1G SFP. And make sure the optical modules is correctly connected with the corresponding port on the switch. Hope this would help.
The 1900 switch has 100-fx ports, which as the name implies, is 100 Mb. The Gigabit fiber ports can't operate at that speed.
32,123
I have replaced old Cisco 1900 switches with 3850's in my plant process areas. Added Fiber links between 3850's for increased performance. I can't get data transfer through the fiber uplinks. I have assigned some of the LAN ports to the different VLANS and they are communicating correctly. The Gib Fiber ports when...
2016/06/09
[ "https://networkengineering.stackexchange.com/questions/32123", "https://networkengineering.stackexchange.com", "https://networkengineering.stackexchange.com/users/27032/" ]
Make sure the module is recognized by the switch. Issue: **show inventory** Stack1#sh inv NAME: **"Switch 1 FRU Uplink Module 1", DESCR: "2x1G 2x10G Uplink Module"** PID: C3850-NM-2-10G , VID: V01 , SN: XXX NAME: "Te2/1/1", DESCR: "SFP-10GBase-SR" PID: SFP-10G-SR , VID: V03 , SN: XXX If the Uplink module is not re...
You may be up against a distance limitation. If the old switches were uplinked using 100Base-FX (100Mbps) realize that signal can propagate over 1 mile over FDDI-grade multimode fiber. Newer gigabit uplinks can propogate 1804 feet (550 m). There are 100Base-FX transceivers for the 3850, so you might need to get those,...
32,123
I have replaced old Cisco 1900 switches with 3850's in my plant process areas. Added Fiber links between 3850's for increased performance. I can't get data transfer through the fiber uplinks. I have assigned some of the LAN ports to the different VLANS and they are communicating correctly. The Gib Fiber ports when...
2016/06/09
[ "https://networkengineering.stackexchange.com/questions/32123", "https://networkengineering.stackexchange.com", "https://networkengineering.stackexchange.com/users/27032/" ]
Cisco 3850 Series Switch is a 10-Gbps network switch, which means you need to use 10G SFP+ optical module or under 10G optical module, such as 1G SFP. And make sure the optical modules is correctly connected with the corresponding port on the switch. Hope this would help.
You may be up against a distance limitation. If the old switches were uplinked using 100Base-FX (100Mbps) realize that signal can propagate over 1 mile over FDDI-grade multimode fiber. Newer gigabit uplinks can propogate 1804 feet (550 m). There are 100Base-FX transceivers for the 3850, so you might need to get those,...
32,123
I have replaced old Cisco 1900 switches with 3850's in my plant process areas. Added Fiber links between 3850's for increased performance. I can't get data transfer through the fiber uplinks. I have assigned some of the LAN ports to the different VLANS and they are communicating correctly. The Gib Fiber ports when...
2016/06/09
[ "https://networkengineering.stackexchange.com/questions/32123", "https://networkengineering.stackexchange.com", "https://networkengineering.stackexchange.com/users/27032/" ]
Make sure the module is recognized by the switch. Issue: **show inventory** Stack1#sh inv NAME: **"Switch 1 FRU Uplink Module 1", DESCR: "2x1G 2x10G Uplink Module"** PID: C3850-NM-2-10G , VID: V01 , SN: XXX NAME: "Te2/1/1", DESCR: "SFP-10GBase-SR" PID: SFP-10G-SR , VID: V03 , SN: XXX If the Uplink module is not re...
Cisco 3850 Series Switch is a 10-Gbps network switch, which means you need to use 10G SFP+ optical module or under 10G optical module, such as 1G SFP. And make sure the optical modules is correctly connected with the corresponding port on the switch. Hope this would help.
32,123
I have replaced old Cisco 1900 switches with 3850's in my plant process areas. Added Fiber links between 3850's for increased performance. I can't get data transfer through the fiber uplinks. I have assigned some of the LAN ports to the different VLANS and they are communicating correctly. The Gib Fiber ports when...
2016/06/09
[ "https://networkengineering.stackexchange.com/questions/32123", "https://networkengineering.stackexchange.com", "https://networkengineering.stackexchange.com/users/27032/" ]
Make sure the module is recognized by the switch. Issue: **show inventory** Stack1#sh inv NAME: **"Switch 1 FRU Uplink Module 1", DESCR: "2x1G 2x10G Uplink Module"** PID: C3850-NM-2-10G , VID: V01 , SN: XXX NAME: "Te2/1/1", DESCR: "SFP-10GBase-SR" PID: SFP-10G-SR , VID: V03 , SN: XXX If the Uplink module is not re...
Verify distance limitations of the GBICs. Make sure the speed commands (if any) match at both ends. Verify it's a compatible GBIC for Cisco. (There are unofficial commands to use non-Cisco GBICs but I'll let you research that and use at your own risk) Verify you have fiber transmit and receive flipped on one end. If...
32,123
I have replaced old Cisco 1900 switches with 3850's in my plant process areas. Added Fiber links between 3850's for increased performance. I can't get data transfer through the fiber uplinks. I have assigned some of the LAN ports to the different VLANS and they are communicating correctly. The Gib Fiber ports when...
2016/06/09
[ "https://networkengineering.stackexchange.com/questions/32123", "https://networkengineering.stackexchange.com", "https://networkengineering.stackexchange.com/users/27032/" ]
Make sure the module is recognized by the switch. Issue: **show inventory** Stack1#sh inv NAME: **"Switch 1 FRU Uplink Module 1", DESCR: "2x1G 2x10G Uplink Module"** PID: C3850-NM-2-10G , VID: V01 , SN: XXX NAME: "Te2/1/1", DESCR: "SFP-10GBase-SR" PID: SFP-10G-SR , VID: V03 , SN: XXX If the Uplink module is not re...
the nm modules you have is 2x1G and 2x10G. as per data sheet, the first 2 ports are 1G and the last 2 ports are 10G. so ideally yyou should use the te2/1/3 or 2/1/4 with the 10 g SFP as the first 2 ports will not support the SFP-10-R modules.
32,123
I have replaced old Cisco 1900 switches with 3850's in my plant process areas. Added Fiber links between 3850's for increased performance. I can't get data transfer through the fiber uplinks. I have assigned some of the LAN ports to the different VLANS and they are communicating correctly. The Gib Fiber ports when...
2016/06/09
[ "https://networkengineering.stackexchange.com/questions/32123", "https://networkengineering.stackexchange.com", "https://networkengineering.stackexchange.com/users/27032/" ]
Cisco 3850 Series Switch is a 10-Gbps network switch, which means you need to use 10G SFP+ optical module or under 10G optical module, such as 1G SFP. And make sure the optical modules is correctly connected with the corresponding port on the switch. Hope this would help.
Verify distance limitations of the GBICs. Make sure the speed commands (if any) match at both ends. Verify it's a compatible GBIC for Cisco. (There are unofficial commands to use non-Cisco GBICs but I'll let you research that and use at your own risk) Verify you have fiber transmit and receive flipped on one end. If...
32,123
I have replaced old Cisco 1900 switches with 3850's in my plant process areas. Added Fiber links between 3850's for increased performance. I can't get data transfer through the fiber uplinks. I have assigned some of the LAN ports to the different VLANS and they are communicating correctly. The Gib Fiber ports when...
2016/06/09
[ "https://networkengineering.stackexchange.com/questions/32123", "https://networkengineering.stackexchange.com", "https://networkengineering.stackexchange.com/users/27032/" ]
Cisco 3850 Series Switch is a 10-Gbps network switch, which means you need to use 10G SFP+ optical module or under 10G optical module, such as 1G SFP. And make sure the optical modules is correctly connected with the corresponding port on the switch. Hope this would help.
the nm modules you have is 2x1G and 2x10G. as per data sheet, the first 2 ports are 1G and the last 2 ports are 10G. so ideally yyou should use the te2/1/3 or 2/1/4 with the 10 g SFP as the first 2 ports will not support the SFP-10-R modules.
7,050,552
When creating MSBuild Items from files using wildcards, such as, ``` <ItemGroup> <Scripts>$(ScriptsDirectory)\**\*.sql</Scripts> </ItemGroup> ``` the files *seem* to always be sorted alphabetically by path. However, is this sort order guaranteed - can I rely on it?
2011/08/13
[ "https://Stackoverflow.com/questions/7050552", "https://Stackoverflow.com", "https://Stackoverflow.com/users/893052/" ]
Yes, MSBuild will always sort alphabetically by path, in order to guarantee repeatability. (This is covered in my new book, "MSBuild Trickery")
I needed to sort an ItemGroup of files based on the actual filename, not the full path. So I wrote an MSBuild task to do this, hope it helps... [MSBuild sort itemgroup of files by filename](http://jpadda.wordpress.com/2012/01/05/sort-2-dimensional-jagged-array-csharp/)
7,050,552
When creating MSBuild Items from files using wildcards, such as, ``` <ItemGroup> <Scripts>$(ScriptsDirectory)\**\*.sql</Scripts> </ItemGroup> ``` the files *seem* to always be sorted alphabetically by path. However, is this sort order guaranteed - can I rely on it?
2011/08/13
[ "https://Stackoverflow.com/questions/7050552", "https://Stackoverflow.com", "https://Stackoverflow.com/users/893052/" ]
Yes, MSBuild will always sort alphabetically by path, in order to guarantee repeatability. (This is covered in my new book, "MSBuild Trickery")
Some time back I came across an [oddity](http://www.fishofprey.com/2011/04/msbuild-sort-itemgroup.html) transitioning from Visual Studio 2008 to 2010 with the ordering of an ItemGroup that was creating using a wildcard. File names that started with an underscore character '\_' went from being first in the results to la...
59,792,267
I need to modify my method and login view to receive AJAX requests. How would I do to by clicking the submit button, calling the controller, doing the validations and then submitting this information? The answers I found didn't help much for this solution. I'm starting to work with Jquery now, but I've never used aj...
2020/01/17
[ "https://Stackoverflow.com/questions/59792267", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5491043/" ]
Have you looked into the Ajax Form extension in MVC? ``` @using (Ajax.BeginForm(actionName: "Login", controllerName: "Account", routeValues: null, ajaxOptions: new AjaxOptions { HttpMethod = "...
First of all, the solution is very **easy**. **Step 1:** Create the Login Form **Step 2:** Submit the form using ajax. **Step 3:** Validate the user and send a response. **Step 4:** Use that response at ajax to redirect user to the desired page. *This is a simple example, not the best practice to be used in pr...
13,940,316
This topic has come up many times on StackOverflow, but I believe this is a new take. Yes, I have read [Bruce Dawson's articles](http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm) and [What Every Computer Scientist Should Know About Floating-Point Arithmetic](https://www.ualberta.ca/~kbeach/phys...
2012/12/18
[ "https://Stackoverflow.com/questions/13940316", "https://Stackoverflow.com", "https://Stackoverflow.com/users/768469/" ]
“Almost Equals” Is Not a Good Function -------------------------------------- **4 is not an appropriate value:** The answer you point to states “Therefore, 4 should be enough for ordinary use” but contains no basis for that claim. In fact, there are ordinary situations in which numbers calculated in floating-point by ...
**Simplification:** You could avoid my\_frexp by discarding the non finite cases first all-together: ``` if( ! std::isfinite(a) || ! std::isfinite(b) ) return a == b; ``` It seems that isfinite is in C++11 at least **EDIT** However, if intention is to have `limits::infinity()` within 1 ulp of `limits::max()` ...
13,940,316
This topic has come up many times on StackOverflow, but I believe this is a new take. Yes, I have read [Bruce Dawson's articles](http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm) and [What Every Computer Scientist Should Know About Floating-Point Arithmetic](https://www.ualberta.ca/~kbeach/phys...
2012/12/18
[ "https://Stackoverflow.com/questions/13940316", "https://Stackoverflow.com", "https://Stackoverflow.com/users/768469/" ]
“Almost Equals” Is Not a Good Function -------------------------------------- **4 is not an appropriate value:** The answer you point to states “Therefore, 4 should be enough for ordinary use” but contains no basis for that claim. In fact, there are ordinary situations in which numbers calculated in floating-point by ...
**FUTURE PROOFING**: If you ever want to extend such comparison to decimal float <http://en.wikipedia.org/wiki/Decimal64_floating-point_format> in the future, and assuming that ldexp() and frexp() will handle such type with correct radix, then striclty speaking, 0.5 in `return std::copysign(0.5, num);` should be replac...
13,940,316
This topic has come up many times on StackOverflow, but I believe this is a new take. Yes, I have read [Bruce Dawson's articles](http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm) and [What Every Computer Scientist Should Know About Floating-Point Arithmetic](https://www.ualberta.ca/~kbeach/phys...
2012/12/18
[ "https://Stackoverflow.com/questions/13940316", "https://Stackoverflow.com", "https://Stackoverflow.com/users/768469/" ]
“Almost Equals” Is Not a Good Function -------------------------------------- **4 is not an appropriate value:** The answer you point to states “Therefore, 4 should be enough for ordinary use” but contains no basis for that claim. In fact, there are ordinary situations in which numbers calculated in floating-point by ...
Two disadvantages of your approach are that your implementation relies on several functions from `<cmath>` which are clearly only working for **floating point numbers found in the standard** and sadly are currently **not guaranteed to be `constexpr`** (While with GCC a `constexpr` version of your function will compile ...
13,940,316
This topic has come up many times on StackOverflow, but I believe this is a new take. Yes, I have read [Bruce Dawson's articles](http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm) and [What Every Computer Scientist Should Know About Floating-Point Arithmetic](https://www.ualberta.ca/~kbeach/phys...
2012/12/18
[ "https://Stackoverflow.com/questions/13940316", "https://Stackoverflow.com", "https://Stackoverflow.com/users/768469/" ]
**Simplification:** You could avoid my\_frexp by discarding the non finite cases first all-together: ``` if( ! std::isfinite(a) || ! std::isfinite(b) ) return a == b; ``` It seems that isfinite is in C++11 at least **EDIT** However, if intention is to have `limits::infinity()` within 1 ulp of `limits::max()` ...
**FUTURE PROOFING**: If you ever want to extend such comparison to decimal float <http://en.wikipedia.org/wiki/Decimal64_floating-point_format> in the future, and assuming that ldexp() and frexp() will handle such type with correct radix, then striclty speaking, 0.5 in `return std::copysign(0.5, num);` should be replac...
13,940,316
This topic has come up many times on StackOverflow, but I believe this is a new take. Yes, I have read [Bruce Dawson's articles](http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm) and [What Every Computer Scientist Should Know About Floating-Point Arithmetic](https://www.ualberta.ca/~kbeach/phys...
2012/12/18
[ "https://Stackoverflow.com/questions/13940316", "https://Stackoverflow.com", "https://Stackoverflow.com/users/768469/" ]
**Simplification:** You could avoid my\_frexp by discarding the non finite cases first all-together: ``` if( ! std::isfinite(a) || ! std::isfinite(b) ) return a == b; ``` It seems that isfinite is in C++11 at least **EDIT** However, if intention is to have `limits::infinity()` within 1 ulp of `limits::max()` ...
Two disadvantages of your approach are that your implementation relies on several functions from `<cmath>` which are clearly only working for **floating point numbers found in the standard** and sadly are currently **not guaranteed to be `constexpr`** (While with GCC a `constexpr` version of your function will compile ...
45,002,200
I've been trying to use **styled-components** with the **alpha** version of **material-ui** According to the [documentation](https://material-ui-1dab0.firebaseapp.com/customization/css-in-js), this should work out of the box. This code: ``` const StyledButton = styled(Button)` color: red; text-transform: upper...
2017/07/10
[ "https://Stackoverflow.com/questions/45002200", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1618964/" ]
``` SELECT PRODUCTID, Productname, unitprice FROM Products WHERE unitprice > (SELECT AVG(unitprice) FROM Products) ```
In almost any database, the best way is to use window functions; ``` SELECT PRODUCTID, Productname, unitprice FROM (SELECT p.*, AVG(unitprice) OVER () as avg_up FROM Products p ) p WHERE unitprice > avg_up; ```
7,330,404
Using Boost.Python, how can I define a module inside another (or rather, as if it were located in a folder)?
2011/09/07
[ "https://Stackoverflow.com/questions/7330404", "https://Stackoverflow.com", "https://Stackoverflow.com/users/627005/" ]
Solution (without altering the indexes on my tables): ``` SELECT df.*, ( SELECT dfa.file_archive_id FROM dca_file_archive dfa WHERE df.file_id = dfa.file_id ORDER BY dfa.file_archive_version desc LIMIT 1 ) as file_archive_id, ( SELECT dfa.file_archive...
Try this (i named your tables `table1` and `table2`): ``` SELECT t1.fild_id, t1.file_name, t2A.file_archive_id, t2A.file_archive_version FROM table1 t1 JOIN table2 t2A ON (t1.fild_id = t2A.file_id) WHERE NOT EXISTS ( SELECT * FROM table2 t2B ...
7,330,404
Using Boost.Python, how can I define a module inside another (or rather, as if it were located in a folder)?
2011/09/07
[ "https://Stackoverflow.com/questions/7330404", "https://Stackoverflow.com", "https://Stackoverflow.com/users/627005/" ]
Solution (without altering the indexes on my tables): ``` SELECT df.*, ( SELECT dfa.file_archive_id FROM dca_file_archive dfa WHERE df.file_id = dfa.file_id ORDER BY dfa.file_archive_version desc LIMIT 1 ) as file_archive_id, ( SELECT dfa.file_archive...
Try this one - ``` SELECT f.*, a1.file_archive_id, a1.file_archive_version FROM files f JOIN file_archives a1 ON f.file_id = a1.file_id JOIN ( SELECT file_id, MAX(file_archive_version) max_file_archive_version FROM file_archives GROUP BY file_id ) a2 ON a1.file_id = a2.file_id AND a1.file_archive_version = a2....
7,330,404
Using Boost.Python, how can I define a module inside another (or rather, as if it were located in a folder)?
2011/09/07
[ "https://Stackoverflow.com/questions/7330404", "https://Stackoverflow.com", "https://Stackoverflow.com/users/627005/" ]
Solution (without altering the indexes on my tables): ``` SELECT df.*, ( SELECT dfa.file_archive_id FROM dca_file_archive dfa WHERE df.file_id = dfa.file_id ORDER BY dfa.file_archive_version desc LIMIT 1 ) as file_archive_id, ( SELECT dfa.file_archive...
t1 as first table, t2 as second table ``` SELECT t1.file_id as tx_id,t1.file_name,tx.file_archive_id,tx.file_archive_version FROM maindb.t1 t1,maindb.t2 tx WHERE t1.file_id = tx.file_id GROUP BY t1.file_id HAVING max(tx.file_archive_version) >= all ( SELECT max(t2.file_archive_version) FROM maindb.t2 WHER...
30,410,132
I have a form ``` <input type="text" id='name'> <input type="text" id='place'> <button id='add'>Add</button> <button id='show'>Show</button> ``` I have a n object to collect the elements when Add button is triggered and the code is ``` var measure = {}; $("#add").click(function(){ measurecol = new Obje...
2015/05/23
[ "https://Stackoverflow.com/questions/30410132", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Whenever the click method is executed you are creating a new object ``` measurecol = new Object(); ``` which deletes/replaces the previous object. So you loose your previously stored data. if you don't use var before a variable name it creates a global variable. So you just have one measurecol variable which gets a...
use [localStorage](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage) ``` var measure = localStorage; $("#add").click(function(){ measurecol.name = $("#name").val(); measurecol.place = $("#place").val(); measure[measurecol.name] = measurecol; }); ``` i think it will work
30,410,132
I have a form ``` <input type="text" id='name'> <input type="text" id='place'> <button id='add'>Add</button> <button id='show'>Show</button> ``` I have a n object to collect the elements when Add button is triggered and the code is ``` var measure = {}; $("#add").click(function(){ measurecol = new Obje...
2015/05/23
[ "https://Stackoverflow.com/questions/30410132", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
first you can check whether the object is empty or not. If its empty, add the element in the object else if its not empty, append the element based on the length of the object. ``` if(measure != undefined && measure !={}){ measure[measure.length] = measurecol; }else{ measure[measure.length+1] = measurecol; } ...
Whenever the click method is executed you are creating a new object ``` measurecol = new Object(); ``` which deletes/replaces the previous object. So you loose your previously stored data. if you don't use var before a variable name it creates a global variable. So you just have one measurecol variable which gets a...
30,410,132
I have a form ``` <input type="text" id='name'> <input type="text" id='place'> <button id='add'>Add</button> <button id='show'>Show</button> ``` I have a n object to collect the elements when Add button is triggered and the code is ``` var measure = {}; $("#add").click(function(){ measurecol = new Obje...
2015/05/23
[ "https://Stackoverflow.com/questions/30410132", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Whenever the click method is executed you are creating a new object ``` measurecol = new Object(); ``` which deletes/replaces the previous object. So you loose your previously stored data. if you don't use var before a variable name it creates a global variable. So you just have one measurecol variable which gets a...
Using `localStorage`: ``` var measure = {}; $("#add").click(function(){ measurecol = new Object(); measurecol.name = $("#name").val(); measurecol.place = $("#place").val(); measure[measurecol.name] = measurecol; var lastobject = localStorage.getItem("lastobj"); if(lastobject){ lastobj...
30,410,132
I have a form ``` <input type="text" id='name'> <input type="text" id='place'> <button id='add'>Add</button> <button id='show'>Show</button> ``` I have a n object to collect the elements when Add button is triggered and the code is ``` var measure = {}; $("#add").click(function(){ measurecol = new Obje...
2015/05/23
[ "https://Stackoverflow.com/questions/30410132", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
first you can check whether the object is empty or not. If its empty, add the element in the object else if its not empty, append the element based on the length of the object. ``` if(measure != undefined && measure !={}){ measure[measure.length] = measurecol; }else{ measure[measure.length+1] = measurecol; } ...
use [localStorage](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage) ``` var measure = localStorage; $("#add").click(function(){ measurecol.name = $("#name").val(); measurecol.place = $("#place").val(); measure[measurecol.name] = measurecol; }); ``` i think it will work
30,410,132
I have a form ``` <input type="text" id='name'> <input type="text" id='place'> <button id='add'>Add</button> <button id='show'>Show</button> ``` I have a n object to collect the elements when Add button is triggered and the code is ``` var measure = {}; $("#add").click(function(){ measurecol = new Obje...
2015/05/23
[ "https://Stackoverflow.com/questions/30410132", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
first you can check whether the object is empty or not. If its empty, add the element in the object else if its not empty, append the element based on the length of the object. ``` if(measure != undefined && measure !={}){ measure[measure.length] = measurecol; }else{ measure[measure.length+1] = measurecol; } ...
Using `localStorage`: ``` var measure = {}; $("#add").click(function(){ measurecol = new Object(); measurecol.name = $("#name").val(); measurecol.place = $("#place").val(); measure[measurecol.name] = measurecol; var lastobject = localStorage.getItem("lastobj"); if(lastobject){ lastobj...
43,514,227
I was trying to make my splash screen animated and i found [this post](https://coursetro.com/posts/code/51/How-to-Make-an-Animated-Ionic-Splash-Page-with-HTML-&-CSS) very useful. But now the default splash screen can't be removed, I have tried all solutions on internet but no success. This is my Ionic version informati...
2017/04/20
[ "https://Stackoverflow.com/questions/43514227", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7847007/" ]
Just edit in Android Studio conifg.xml (app -> res -> xml -> config.xml), just add `<preference name="Fullscreen" value="true" />` and run your app!
The best way is to install this plugin. <https://www.npmjs.com/package/cordova-custom-config> Installation: ``` cordova plugin add cordova-custom-config ``` If using Cordova version => 6.2.0 use: ``` cordova plugin add cordova-custom-config --fetch ``` Then you can edit the Android theme by editing your confi...
266,585
I have a part that's available as a TSSOP or as a QFN with an exposed thermal ground pad. I want to create a variants in Eagle for both packages. How can I show that the EP pad should be connected to GND without creating a new symbol? [![enter image description here](https://i.stack.imgur.com/CdMUr.png)](https://i.sta...
2016/10/30
[ "https://electronics.stackexchange.com/questions/266585", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/126483/" ]
The append button can connect multiple physical pads with a single logical pin. In addition to thermal pads, can be used to combine multiple VCC or GND pads together to appear as one pin in the schematic [![enter image description here](https://i.stack.imgur.com/zWHZU.png)](https://i.stack.imgur.com/zWHZU.png)
You will need to clone existing *package* adding this pad to it. Ensure that you add pad with respect to spacing between pad and pins. After you do it, add this cloned package to existing device with different name to distinguish it, and connect this new pad as fkoran shown. By the way, it is not clear if you really n...
53,146,615
I'm just a new with **boto3** and i can not understand how i can get URL link for file that i have just uploaded to s3 amazon. Please clarify. Thank you ``` import boto3 s3 = boto3.resource('s3') data = open ('file.xlsx', 'rb') s3.Bucket ('dimxxx1').put_object (Key='file.xlsx', Body=data) ```
2018/11/04
[ "https://Stackoverflow.com/questions/53146615", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9794463/" ]
First, the better way to upload would be: ``` import boto3 s3 = boto3.resource('s3') s3.Bucket('dimxxx1').upload_file('/tmp/file.xlsx', 'file.xlsx') ``` To obtain the URL, you can construct it from the basic elements: ``` http://s3-REGION-.amazonaws.com/BUCKET-NAME/KEY ``` For example: ``` http://s3-ap-southeast...
Here is a fix for this issue to enable you get the URL of S3 file as suggested by this [link](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/s3.html#generating-presigned-urls). You basically have to generate a pre-signed URL for each S3 object you wish to provide access to. See the code below: ``` impor...
53,146,615
I'm just a new with **boto3** and i can not understand how i can get URL link for file that i have just uploaded to s3 amazon. Please clarify. Thank you ``` import boto3 s3 = boto3.resource('s3') data = open ('file.xlsx', 'rb') s3.Bucket ('dimxxx1').put_object (Key='file.xlsx', Body=data) ```
2018/11/04
[ "https://Stackoverflow.com/questions/53146615", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9794463/" ]
in python3, ``` url = f"https://{bucket}.s3.{region}.amazonaws.com/{folder}{file_name}" ```
Here is a fix for this issue to enable you get the URL of S3 file as suggested by this [link](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/s3.html#generating-presigned-urls). You basically have to generate a pre-signed URL for each S3 object you wish to provide access to. See the code below: ``` impor...
53,146,615
I'm just a new with **boto3** and i can not understand how i can get URL link for file that i have just uploaded to s3 amazon. Please clarify. Thank you ``` import boto3 s3 = boto3.resource('s3') data = open ('file.xlsx', 'rb') s3.Bucket ('dimxxx1').put_object (Key='file.xlsx', Body=data) ```
2018/11/04
[ "https://Stackoverflow.com/questions/53146615", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9794463/" ]
Here is a fix for this issue to enable you get the URL of S3 file as suggested by this [link](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/s3.html#generating-presigned-urls). You basically have to generate a pre-signed URL for each S3 object you wish to provide access to. See the code below: ``` impor...
This is proper sequence with python formatter: ``` url = f"https://s3.{region}.amazonaws.com/{bucket}/{folder}...N/{file_name}" ```
53,146,615
I'm just a new with **boto3** and i can not understand how i can get URL link for file that i have just uploaded to s3 amazon. Please clarify. Thank you ``` import boto3 s3 = boto3.resource('s3') data = open ('file.xlsx', 'rb') s3.Bucket ('dimxxx1').put_object (Key='file.xlsx', Body=data) ```
2018/11/04
[ "https://Stackoverflow.com/questions/53146615", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9794463/" ]
First, the better way to upload would be: ``` import boto3 s3 = boto3.resource('s3') s3.Bucket('dimxxx1').upload_file('/tmp/file.xlsx', 'file.xlsx') ``` To obtain the URL, you can construct it from the basic elements: ``` http://s3-REGION-.amazonaws.com/BUCKET-NAME/KEY ``` For example: ``` http://s3-ap-southeast...
in python3, ``` url = f"https://{bucket}.s3.{region}.amazonaws.com/{folder}{file_name}" ```
53,146,615
I'm just a new with **boto3** and i can not understand how i can get URL link for file that i have just uploaded to s3 amazon. Please clarify. Thank you ``` import boto3 s3 = boto3.resource('s3') data = open ('file.xlsx', 'rb') s3.Bucket ('dimxxx1').put_object (Key='file.xlsx', Body=data) ```
2018/11/04
[ "https://Stackoverflow.com/questions/53146615", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9794463/" ]
First, the better way to upload would be: ``` import boto3 s3 = boto3.resource('s3') s3.Bucket('dimxxx1').upload_file('/tmp/file.xlsx', 'file.xlsx') ``` To obtain the URL, you can construct it from the basic elements: ``` http://s3-REGION-.amazonaws.com/BUCKET-NAME/KEY ``` For example: ``` http://s3-ap-southeast...
This is proper sequence with python formatter: ``` url = f"https://s3.{region}.amazonaws.com/{bucket}/{folder}...N/{file_name}" ```
53,146,615
I'm just a new with **boto3** and i can not understand how i can get URL link for file that i have just uploaded to s3 amazon. Please clarify. Thank you ``` import boto3 s3 = boto3.resource('s3') data = open ('file.xlsx', 'rb') s3.Bucket ('dimxxx1').put_object (Key='file.xlsx', Body=data) ```
2018/11/04
[ "https://Stackoverflow.com/questions/53146615", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9794463/" ]
in python3, ``` url = f"https://{bucket}.s3.{region}.amazonaws.com/{folder}{file_name}" ```
This is proper sequence with python formatter: ``` url = f"https://s3.{region}.amazonaws.com/{bucket}/{folder}...N/{file_name}" ```
53,474,490
Screenshot [![enter image description here](https://i.stack.imgur.com/KisKG.jpg)](https://i.stack.imgur.com/KisKG.jpg) As you can see, the layout is a bit too big for the older device. My idea is to shrink the CardView while the user is scrolling in the white area (ViewPager) to make it bigger. I have seen it working...
2018/11/26
[ "https://Stackoverflow.com/questions/53474490", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9276801/" ]
os.path.isdir and os.path.isfile both are ok! os.path.exists(path) and os.path.isdir(path) == os.path.isfile(path) is always False
You should be all good to just use `os.path.isdir`. This only looks for if the path that is inputted is a directory. Otherwise, it is okay to assume it is a file. I have tested to see if any cases of when`os.path.exists(path) and os.path.isdir(path) == os.path.isfile(path)` Here are the results. `print(os.path.isdir("...
53,474,490
Screenshot [![enter image description here](https://i.stack.imgur.com/KisKG.jpg)](https://i.stack.imgur.com/KisKG.jpg) As you can see, the layout is a bit too big for the older device. My idea is to shrink the CardView while the user is scrolling in the white area (ViewPager) to make it bigger. I have seen it working...
2018/11/26
[ "https://Stackoverflow.com/questions/53474490", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9276801/" ]
os.path.isdir and os.path.isfile both are ok! os.path.exists(path) and os.path.isdir(path) == os.path.isfile(path) is always False
`os.path.isdir(path) == os.path.isfile(path)` should never hold in all disk file systems I am aware of, as this should mean that the same object is both a dir and a file. For [EXT4](https://ext4.wiki.kernel.org/index.php/Ext4_Disk_Layout) specifically, it is my understanding that an inode can either be a directory or a...
53,474,490
Screenshot [![enter image description here](https://i.stack.imgur.com/KisKG.jpg)](https://i.stack.imgur.com/KisKG.jpg) As you can see, the layout is a bit too big for the older device. My idea is to shrink the CardView while the user is scrolling in the white area (ViewPager) to make it bigger. I have seen it working...
2018/11/26
[ "https://Stackoverflow.com/questions/53474490", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9276801/" ]
You should be all good to just use `os.path.isdir`. This only looks for if the path that is inputted is a directory. Otherwise, it is okay to assume it is a file. I have tested to see if any cases of when`os.path.exists(path) and os.path.isdir(path) == os.path.isfile(path)` Here are the results. `print(os.path.isdir("...
`os.path.isdir(path) == os.path.isfile(path)` should never hold in all disk file systems I am aware of, as this should mean that the same object is both a dir and a file. For [EXT4](https://ext4.wiki.kernel.org/index.php/Ext4_Disk_Layout) specifically, it is my understanding that an inode can either be a directory or a...
61,343,272
i want the new html file to be created in the same folder in which HTML is present. please help me. am searching a lot , no luck ``` <script> function makeDocument() { var doc = document.implementation.createHTMLDocument("newdoc"); var p = doc.createElement("p"); p.innerHTML = "This is a new paragraph."; ...
2020/04/21
[ "https://Stackoverflow.com/questions/61343272", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13371266/" ]
Use a back-end server. Because the HTML page and the scripts are executed on the client-side. You can't really create a file on the client-side while the page is loaded in a browser. The other way around, you won't want the client to create arbitrary files on the server as well. It poses a great security risk and migh...
You do not have a closing brace on your function ``` <script> function makeDocument() { var doc = document.implementation.createHTMLDocument("newdoc"); var p = doc.createElement("p"); p.innerHTML = "This is a new paragraph."; try { doc.body.appendChild(p); } catch(e) { console.log(e); } va...
418,794
Just spent 2+ hrs trying to discover where my top horizontal favorites bar went. I could drag/drop new favs to it and it had >> at the end to that dropped down to a older/larger fav's list
2012/04/30
[ "https://superuser.com/questions/418794", "https://superuser.com", "https://superuser.com/users/131184/" ]
Favorites? Bookmarks? Is this for your web browser? Chrome? Firefox? Safari? Internet Explorer? Well... with Chrome, Ctrl+Shift+B shows/hides the Bookmark Toolbar. With Firefox, use the View menu at the top, Toolbars, Bookmark Toolbar to bring it back. With Internet Explorer, use the View menu at the top, Toolbars, ...
In Google Chrome you can go to Settings (Click on the ![Spanner icon](https://i.stack.imgur.com/Aehlw.gif) in the top-right hand corner of the browser for a dropdown menu). Under the 'Basics' tab in the section titled 'Toolbar' tick the box that says 'Always show the bookmarks bar'. You can also use Ctrl + Shift + B t...
499,030
My problem is that the following tree produced with tikzpicture squeezes my nodes way too close together, as you can see in the picture below. I have been trying to use level distance to move the them further apart, but I can't seem to figure out the right way to use it. Please excuse me if this seems simple. I'm stil...
2019/07/07
[ "https://tex.stackexchange.com/questions/499030", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/192391/" ]
In order to save some horizontal space, I have introduced a linebreak in the first node (As stated on page 3 of the `tikz-qtree` documentation this can be done using the `align` option.) I have also increased the value of `level distance` : [![enter image description here](https://i.stack.imgur.com/3yR5K.png)](https:/...
With `forest` is simple. With `l sep` you can define distance between levels independently from length of node text: [![enter image description here](https://i.stack.imgur.com/IbvVt.png)](https://i.stack.imgur.com/IbvVt.png) ``` \documentclass{article} \usepackage[edges]{forest} \begin{document} \begin{forest} for t...
10,795,682
If the same object is invoked multiple times in python, will the memory location always be the same when I print 'self'?
2012/05/29
[ "https://Stackoverflow.com/questions/10795682", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1199438/" ]
AFAIK, memory addresses in Cpython are - by design - static. The memory address of an object can be seen with `id()`. The name of the function is a tell-tale of the fact it doesn't change... See however the comment below, where other SO users pointed out that `id()` being the memory address is a detail implementation ...
Note that, beeing a very high-level language, Python does not define "memory addresses" for objects. Objects do however have an "identity" that can be queried using the [built-in `id()` function](http://docs.python.org/library/functions.html#id). This identity is guaranteed not to change during an object's lifetime: >...
10,795,682
If the same object is invoked multiple times in python, will the memory location always be the same when I print 'self'?
2012/05/29
[ "https://Stackoverflow.com/questions/10795682", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1199438/" ]
AFAIK, memory addresses in Cpython are - by design - static. The memory address of an object can be seen with `id()`. The name of the function is a tell-tale of the fact it doesn't change... See however the comment below, where other SO users pointed out that `id()` being the memory address is a detail implementation ...
As **mac** noticed, *memory addresses in Cpython are - by design - static* But even on Cpython you can't relay on this if you are using some c extensions. Some of them can move objects and manually drive garbage collector. And if you are using other Python implementations, as **PyPy**, you are certain not guarantee...
10,795,682
If the same object is invoked multiple times in python, will the memory location always be the same when I print 'self'?
2012/05/29
[ "https://Stackoverflow.com/questions/10795682", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1199438/" ]
Note that, beeing a very high-level language, Python does not define "memory addresses" for objects. Objects do however have an "identity" that can be queried using the [built-in `id()` function](http://docs.python.org/library/functions.html#id). This identity is guaranteed not to change during an object's lifetime: >...
As **mac** noticed, *memory addresses in Cpython are - by design - static* But even on Cpython you can't relay on this if you are using some c extensions. Some of them can move objects and manually drive garbage collector. And if you are using other Python implementations, as **PyPy**, you are certain not guarantee...
13,527,459
I am creating a calculator.This is my html for the calculator: <http://pastebin.com/JQYbNBmZ> and this is my css for the calculator: <http://pastebin.com/DEMgqyYi> I have used `width="100%"` for the buttons `CE`, `CA` and `0` to stretch 2 columns. However, if I use `height="100%"` for the buttons `+` and `=` to stret...
2012/11/23
[ "https://Stackoverflow.com/questions/13527459", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1836143/" ]
Try using `<context:annotation-config/>` instead of `<mvc:annotation-driven />` in your test-context.xml file. `<mvc:annotation-driven/>` is a tag added in Spring 3.0 which does the following: 1. Configures the Spring 3 Type ConversionService (alternative to PropertyEditors) 2. Adds support for formattin...
It looks to me like `articleDao` is not being set. If you want to use a Spring bean in the test then you can't instantiate the service in your test. Take this line out... ``` articleService = new ArticleService(); ```
103,503
It seems pretty obvious that a convert keeps his property. It is also Halachicly valid - a convert does not re-acquire his property back after conversion (see [Mishnah\_Peah.4.6](http://sefaria.org/Mishnah_Peah.4.6) or [Mishnah\_Challah.3.6](http://sefaria.org/Mishnah_Challah.3.6) thanks Heshy). But why? Here's how I...
2019/05/07
[ "https://judaism.stackexchange.com/questions/103503", "https://judaism.stackexchange.com", "https://judaism.stackexchange.com/users/15579/" ]
Here's an interesting direction of thought: Many Gemmoros tie between one's property and Nefesh ("lower" soul), for example (B"M 112a): > > ואליו הוא נושא את נפשו כל הכובש שכר שכיר כאילו נוטל נפשו ממנו > > > one who withholds the wages of a hired laborer, it is as though he takes his soul from him > > > This m...
It is known that in Talmudic learning we cannot infer without discernment from the words of the Gemara, an inference is not an hazardous extrapolation. You cannot ask a question based on an hazardous extrapolation. A kushia needs a strong basis. If there is not a strong basis for the kushia, there is no difficulty to u...
103,503
It seems pretty obvious that a convert keeps his property. It is also Halachicly valid - a convert does not re-acquire his property back after conversion (see [Mishnah\_Peah.4.6](http://sefaria.org/Mishnah_Peah.4.6) or [Mishnah\_Challah.3.6](http://sefaria.org/Mishnah_Challah.3.6) thanks Heshy). But why? Here's how I...
2019/05/07
[ "https://judaism.stackexchange.com/questions/103503", "https://judaism.stackexchange.com", "https://judaism.stackexchange.com/users/15579/" ]
The חות יאיר (סי׳ ע״ט) writes that גר שנתגייר כקטן שנולד דמי applies only to laws where a Jew and non-Jew are different. In any law where they are the same, he retains the *dinim* from his gentile days. Accordingly, he will retain his ownership, for property rights are equal to Jew and non-Jew alike.
It is known that in Talmudic learning we cannot infer without discernment from the words of the Gemara, an inference is not an hazardous extrapolation. You cannot ask a question based on an hazardous extrapolation. A kushia needs a strong basis. If there is not a strong basis for the kushia, there is no difficulty to u...
38,688,431
I'm trying to echo out a php variable inside a div like that `<div class="kor $value">` ``` $value = get_theme_mod( 'ani', 'fadeIn' ); $output .= apply_filters( 'wal') ? '<div class="kor' <?php echo $value' ">':''); ```
2016/07/31
[ "https://Stackoverflow.com/questions/38688431", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6327769/" ]
**Update**: The functions listed here are maintained in a GitHub repo, [.hpp](https://github.com/coder0xff/Plange/blob/master/source/utilities/utf.hpp), [.cpp](https://github.com/coder0xff/Plange/blob/master/source/utilities/utf.cpp) and [tests](https://github.com/coder0xff/Plange/blob/master/source/utilities/utilities...
I've written a little [utf\_ranges](https://github.com/tcbrindle/utf_ranges) library for doing just this. It uses Range-V3 and C++14. It has both views and actions (if you're familiar with Range-V3 terminology) for converting between any of the three main UTF encodings, can consume and generate byte order marks, and p...
38,688,431
I'm trying to echo out a php variable inside a div like that `<div class="kor $value">` ``` $value = get_theme_mod( 'ani', 'fadeIn' ); $output .= apply_filters( 'wal') ? '<div class="kor' <?php echo $value' ">':''); ```
2016/07/31
[ "https://Stackoverflow.com/questions/38688431", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6327769/" ]
**Update**: The functions listed here are maintained in a GitHub repo, [.hpp](https://github.com/coder0xff/Plange/blob/master/source/utilities/utf.hpp), [.cpp](https://github.com/coder0xff/Plange/blob/master/source/utilities/utf.cpp) and [tests](https://github.com/coder0xff/Plange/blob/master/source/utilities/utilities...
Here's my UTF-8 code from Baby X (<https://github.com/MalcolmMcLean/babyx>) ``` static const unsigned int offsetsFromUTF8[6] = { 0x00000000UL, 0x00003080UL, 0x000E2080UL, 0x03C82080UL, 0xFA082080UL, 0x82082080UL }; static const unsigned char trailingBytesForUTF8[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, ...
38,688,431
I'm trying to echo out a php variable inside a div like that `<div class="kor $value">` ``` $value = get_theme_mod( 'ani', 'fadeIn' ); $output .= apply_filters( 'wal') ? '<div class="kor' <?php echo $value' ">':''); ```
2016/07/31
[ "https://Stackoverflow.com/questions/38688431", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6327769/" ]
I've written a little [utf\_ranges](https://github.com/tcbrindle/utf_ranges) library for doing just this. It uses Range-V3 and C++14. It has both views and actions (if you're familiar with Range-V3 terminology) for converting between any of the three main UTF encodings, can consume and generate byte order marks, and p...
Here's my UTF-8 code from Baby X (<https://github.com/MalcolmMcLean/babyx>) ``` static const unsigned int offsetsFromUTF8[6] = { 0x00000000UL, 0x00003080UL, 0x000E2080UL, 0x03C82080UL, 0xFA082080UL, 0x82082080UL }; static const unsigned char trailingBytesForUTF8[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, ...
60,146,072
I am using React Context to pass in the state and setState like this ``` const [authContext, setAuthData] = useState({ isAuthenticated: false, userID:"-1", email:"test", name:"test" }); <AuthContext.Provider value={[authContext,setAuthData]}> <Router> <NavbarMenu /> ...
2020/02/10
[ "https://Stackoverflow.com/questions/60146072", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2775042/" ]
You get an infinite loop because setAuthData call changes authContext. When authContext changes HomePage would re-render and it trigger setAuthData again. Make sure you call setAuthData only once for example: ``` const HomePage = () => { React.useEffect(() => { if (data && data.login && data.login.token) { ...
This might be the issue: ``` const HomePage = () => { if(data && data.login && data.login.token){ console.log("Data token exists"); setAuthData(() => [{ isAuthenticated: true, userID:data.login.id, email:data.login.email, name:data.login.name }]);...
60,146,072
I am using React Context to pass in the state and setState like this ``` const [authContext, setAuthData] = useState({ isAuthenticated: false, userID:"-1", email:"test", name:"test" }); <AuthContext.Provider value={[authContext,setAuthData]}> <Router> <NavbarMenu /> ...
2020/02/10
[ "https://Stackoverflow.com/questions/60146072", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2775042/" ]
You get an infinite loop because setAuthData call changes authContext. When authContext changes HomePage would re-render and it trigger setAuthData again. Make sure you call setAuthData only once for example: ``` const HomePage = () => { React.useEffect(() => { if (data && data.login && data.login.token) { ...
I guess you should do the state update in `useEffect` hook and pass the second parameter to react only when it updates: ``` const HomePage = () => { useEffect(()=>{ //if(data && data.login && data.login.token){ console.log("Data token exists"); setAuthData(() => [{ ...
15,618,521
i have a powershell script with 2 export-csv to the same file. But the second export-csv overwrite the previous csv file. I don't want this. For the second export-csv, i want write the result to the B column in excel, so i want to export in the same csv file, but to the second column. The $dataSet.Tables["Query1"] ...
2013/03/25
[ "https://Stackoverflow.com/questions/15618521", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2207842/" ]
As @C.B. mentioned, `-Append` doesn't exist in `Export-Csv` before PowerShell 3.0. What you can do in PowerShell 2.0 and earlier is something like this: ``` ... | ConvertTo-Csv -NoTypeInformation ` | select -Skip 1 ` | Out-File "C:\result.csv" -Append ```
Have a look at the [`Export-CSV` help](http://technet.microsoft.com/library/hh849932.aspx) - the `-Append`switch is what you're after.
15,618,521
i have a powershell script with 2 export-csv to the same file. But the second export-csv overwrite the previous csv file. I don't want this. For the second export-csv, i want write the result to the B column in excel, so i want to export in the same csv file, but to the second column. The $dataSet.Tables["Query1"] ...
2013/03/25
[ "https://Stackoverflow.com/questions/15618521", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2207842/" ]
This is how i resolved it ``` $mysql = New-Object MySql.Data.MySqlClient.MySqlConnection("server=$serv;port=$port;uid=$user;pwd=$password;database=$db;Pooling=False") $mysql.Open() $sqlquery1 = Get-Content "C:\query1.txt" $sqlquery2 = Get-Content "C:\query2.txt" $req = New-Object Mysql.Data.MysqlClient.MySqlCommand...
Have a look at the [`Export-CSV` help](http://technet.microsoft.com/library/hh849932.aspx) - the `-Append`switch is what you're after.
15,618,521
i have a powershell script with 2 export-csv to the same file. But the second export-csv overwrite the previous csv file. I don't want this. For the second export-csv, i want write the result to the B column in excel, so i want to export in the same csv file, but to the second column. The $dataSet.Tables["Query1"] ...
2013/03/25
[ "https://Stackoverflow.com/questions/15618521", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2207842/" ]
As @C.B. mentioned, `-Append` doesn't exist in `Export-Csv` before PowerShell 3.0. What you can do in PowerShell 2.0 and earlier is something like this: ``` ... | ConvertTo-Csv -NoTypeInformation ` | select -Skip 1 ` | Out-File "C:\result.csv" -Append ```
Simple answer: You don't. Your queries returns different headers. If they are the same value but different column names you should convert the result from the second query to objects with the same property name as the first( column1 ) and save the results from both queries in an array that you export when both are do...
15,618,521
i have a powershell script with 2 export-csv to the same file. But the second export-csv overwrite the previous csv file. I don't want this. For the second export-csv, i want write the result to the B column in excel, so i want to export in the same csv file, but to the second column. The $dataSet.Tables["Query1"] ...
2013/03/25
[ "https://Stackoverflow.com/questions/15618521", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2207842/" ]
This is how i resolved it ``` $mysql = New-Object MySql.Data.MySqlClient.MySqlConnection("server=$serv;port=$port;uid=$user;pwd=$password;database=$db;Pooling=False") $mysql.Open() $sqlquery1 = Get-Content "C:\query1.txt" $sqlquery2 = Get-Content "C:\query2.txt" $req = New-Object Mysql.Data.MysqlClient.MySqlCommand...
Simple answer: You don't. Your queries returns different headers. If they are the same value but different column names you should convert the result from the second query to objects with the same property name as the first( column1 ) and save the results from both queries in an array that you export when both are do...
46,118,513
I'm trying to use the Material UI 1.0 (beta) @withStyles annotation on a React component. The docs give a Javascript example (<https://material-ui-1dab0.firebaseapp.com/customization/css-in-js>), but it gives a compile error in Typescript. It actually emits ok and the app runs fine, so am just trying to rid the IDE of ...
2017/09/08
[ "https://Stackoverflow.com/questions/46118513", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2824661/" ]
What this means is that the [declared type of the `@withStyles` decorator](https://github.com/callemall/material-ui/blob/v1-beta/src/styles/withStyles.d.ts#L23): ``` export default function withStyles<P = {}, ClassNames = {}>( style: StyleRules | StyleRulesCallback, options?: WithStylesOptions ): ( component: Re...
I wasn't able to use @jcalz's type definition since it conflicts with the existing one, so I made a wrapper function. Having `classes` be required on `WithStyles` also makes it a pain to use decorated components, so I make it optional instead. ```js // withStyles.ts import { Theme } from 'material-ui/styles'; import...
7,043,351
I would like to know the behavior of the following. basically i have a static ISessionFactory, and an application with 10 threads running and each of them would use ISessionFactory.OpenSession() to get an ISession. Would this cause any problem?
2011/08/12
[ "https://Stackoverflow.com/questions/7043351", "https://Stackoverflow.com", "https://Stackoverflow.com/users/83181/" ]
No. This is correct. You want to make sure you have a separate session for each thread.
SessionFactory is thread safe but not Session. So if you open a session with ISessionFactory.OpenSession() in a thread and use it there(within that thread) without sharing with other thread, you are safe to go. But do not use ISessionFactory.GetCurrentSession() among multiple therads.
7,043,351
I would like to know the behavior of the following. basically i have a static ISessionFactory, and an application with 10 threads running and each of them would use ISessionFactory.OpenSession() to get an ISession. Would this cause any problem?
2011/08/12
[ "https://Stackoverflow.com/questions/7043351", "https://Stackoverflow.com", "https://Stackoverflow.com/users/83181/" ]
No. This is correct. You want to make sure you have a separate session for each thread.
This will not cause any problems, but make sure that: * you don't 'leak' ISession instance (no other threads will ever have access to it) * you properly Dispose session when you no longer need it ISessionFactory on the other hand is thread safe and can be used from multiple threads without additional synchronization ...
274,345
Could you advise - which is correct. 1.) We are pleased to offer you services of one of our developers. Or 2.) We are pleased to offer you services of one of our developer.
2015/09/16
[ "https://english.stackexchange.com/questions/274345", "https://english.stackexchange.com", "https://english.stackexchange.com/users/138905/" ]
"one of our" denotes more than one - so the correct word is "developers" unless you mean to say "We are pleased to offer you services of our developer"
*We are pleased to offer you **the** services of one of our developer**s***.
42,118,803
I have a trigger that i would like to do separate things depending on certain values. Can you write a case statement to do one thing else do something else Such as below? Is this possible? ``` Case WHEN value1 = 'A' and value2 = 'B' THEN Insert table 1 WHEN value1 = 'A' and value2 = 'C' THEN Insert table 2 END ```
2017/02/08
[ "https://Stackoverflow.com/questions/42118803", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6204796/" ]
You should use `filter` function in order to obtain `value` of option with `txt_scheme` text: ``` $(document).ready(function(){ $("#txt_scheme").keyup(function(){ var valueFromText=$("#scheme option").filter(function(i,option){ return $(option).text()==$("#txt_scheme").val(); }).val(); ...
Use [`contains()`](http://api.jquery.com/contains-selector/) to grab the select option by its text value, and then set its `selected` attribute to true: ``` var textValue = $("#txt_scheme").val(); $("select option:contains("+textValue+")").attr('selected', true); ```
313,458
I'm trying to push two email templates along with other metadata using SFDX. Here's the folder structure: ``` force-app\main\default applications email Demo_Email_Templates FirstEmail.email FirstEmail.email-meta.xml SecondEmail.email SecondEmail.email-met...
2020/07/21
[ "https://salesforce.stackexchange.com/questions/313458", "https://salesforce.stackexchange.com", "https://salesforce.stackexchange.com/users/26651/" ]
i also faced same issue. when ever your `EmailTemplate`'s exist in your custom folder, you need add that folder Developer name also in you package.xml. in my case `test for me` as my custom folder, type is `Email`. [![enter image description here](https://i.stack.imgur.com/O09ea.png)](https://i.stack.imgur.com/O09ea....
> > Error N/A To store the email template in the public folder, enter the > Salesforce organization ID. To store it in a user’s private folder, > enter t that user’s ID. > > > I had similar issue, where I was doing 2 mistakes - 1. I did not have set Workflow User configuration (because I was using Email Alert fro...
313,458
I'm trying to push two email templates along with other metadata using SFDX. Here's the folder structure: ``` force-app\main\default applications email Demo_Email_Templates FirstEmail.email FirstEmail.email-meta.xml SecondEmail.email SecondEmail.email-met...
2020/07/21
[ "https://salesforce.stackexchange.com/questions/313458", "https://salesforce.stackexchange.com", "https://salesforce.stackexchange.com/users/26651/" ]
i also faced same issue. when ever your `EmailTemplate`'s exist in your custom folder, you need add that folder Developer name also in you package.xml. in my case `test for me` as my custom folder, type is `Email`. [![enter image description here](https://i.stack.imgur.com/O09ea.png)](https://i.stack.imgur.com/O09ea....
Silly me, Lightning Email Templates can't be packaged, more info [here](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_emailtemplate.htm).
7,138,899
I am trying to use an ActionSheet to present the user several options to continue. I want to add a simple text box in the middle of the screen to describe the problem to the user. Is there a simple/standard way to put such a prompt in Sencha-Touch?
2011/08/21
[ "https://Stackoverflow.com/questions/7138899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/93031/" ]
You'll need to do something like this on your overlay ... ``` if (!this.popup) { this.popup = new Ext.Panel({ hideOnMaskTap: false, floating: true, modal: true, centered: true, hideOnMaskTap: false, width: 300, height: 200, styleHtmlContent: true, scroll: 'vertical', html: '<p...
You can use an Overlay popup to display a message after the ActionSheet renders.
70,322,414
community, I am trying to implement MPAndroidChart in my android app using java language but android studio returns an error when I sync the project. > > Could not find com.github.PhilJay:MPAndroidChart:v3.1.0.Required by: project :app > > > I have already put the put de dependencies in my build.gradle(app) file ...
2021/12/12
[ "https://Stackoverflow.com/questions/70322414", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13618407/" ]
I have solved this issue by following the instruction post in the [Github issues](https://github.com/PhilJay/MPAndroidChart/issues/1918) for this project To solve this, you need just to add the bellow code in your settings.gradle ``` dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PR...
As crazy4dev says I also have to add build.gradle (Project) ``` // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { google() mavenCentral() maven { url 'https://jitpack.io' } } dependencies { clas...
24,406,397
There are multiple examples of `@private` instance variables all over the Foundation, UIKit and other framework headers. Here are some examples: ``` //CLLocationManager.h @interface CLLocationManager : NSObject { @private id _internal; } <...> //NSAutoreleasePool.h @interface NSAutoreleasePool : NSObject { @priva...
2014/06/25
[ "https://Stackoverflow.com/questions/24406397", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1568491/" ]
Changes Apple have made over the years are to the API (Application Program Interface) but removing members from structures and classes changes the ABI (Application Binary Interface) which cannot be done without forcing all programs in existence to be recompiled or else they will crash. The `void *_reserved` members in...
Many of these headers have been created in ancient times, when instance variables *had* to be declared in a header. And you don't want to change working code unless there is a good reason to do so - after all, it all works fine and you are just curious. Apple cannot just update the header files; they would have to up...
16,606,528
I have the application where user can erase image. So if user touches some px of the image, alfa of these pixels should become lower. For instance, if I touched (0,0) pixel of the image one time, (0,0) px opacity should become 0.9. If I touched that px 10 times I shouldn't see image at point (0,0). What is the best ...
2013/05/17
[ "https://Stackoverflow.com/questions/16606528", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1328838/" ]
You need to *dereference* the pointer, just like you did above. ``` cout << mainVector[1]->name; ``` or ``` cout << (*(mainVector[1])).name; ``` Oh, and ForEveR got it right, vector indices start at 0. To get first element, you can also use `mainVector.front()`. However, you probably don't want to use pointers ...
Firstly - indexes start from zero, so `mainVector[1]` - is not correct. Secondly - if you dereference your pointer `mainVector[0]->name` or `(*mainVector[0]).name` will give correct value.
16,606,528
I have the application where user can erase image. So if user touches some px of the image, alfa of these pixels should become lower. For instance, if I touched (0,0) pixel of the image one time, (0,0) px opacity should become 0.9. If I touched that px 10 times I shouldn't see image at point (0,0). What is the best ...
2013/05/17
[ "https://Stackoverflow.com/questions/16606528", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1328838/" ]
You need to *dereference* the pointer, just like you did above. ``` cout << mainVector[1]->name; ``` or ``` cout << (*(mainVector[1])).name; ``` Oh, and ForEveR got it right, vector indices start at 0. To get first element, you can also use `mainVector.front()`. However, you probably don't want to use pointers ...
From your code, you should be able to do: ``` cout << mainVector[0]->name << endl; ```
16,606,528
I have the application where user can erase image. So if user touches some px of the image, alfa of these pixels should become lower. For instance, if I touched (0,0) pixel of the image one time, (0,0) px opacity should become 0.9. If I touched that px 10 times I shouldn't see image at point (0,0). What is the best ...
2013/05/17
[ "https://Stackoverflow.com/questions/16606528", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1328838/" ]
Firstly - indexes start from zero, so `mainVector[1]` - is not correct. Secondly - if you dereference your pointer `mainVector[0]->name` or `(*mainVector[0]).name` will give correct value.
From your code, you should be able to do: ``` cout << mainVector[0]->name << endl; ```
118,285
I've one illustrator file. The artboard takes much less than 1/4 of an A4 page. I would like to print 80 copies of it, 4 on each page. Is it possible? I know that I can export the image, then ask windows to print them 4 by page, but I will loose illustrators options(trim marks by example). So, is this possible with i...
2018/12/19
[ "https://graphicdesign.stackexchange.com/questions/118285", "https://graphicdesign.stackexchange.com", "https://graphicdesign.stackexchange.com/users/116665/" ]
Use **Symbols**. Group your current artboard. Choose `Effect > Crop Marks` to add crops to it. (or manually add marks, which is what I would do) Drag it all to the **Symbols Panel** to create a symbol of your artwork with the marks. Create a new A4 artboard... Place as many of the *Symbol instances* as you li...
That's my print dialog with the set up to 4 pages per sheet. Click the Setup button to bring that second panel. It is in Portuguese but I think it's easy to figure it out in other languages: [![enter image description here](https://i.stack.imgur.com/WAL8N.png)](https://i.stack.imgur.com/WAL8N.png)
4,973,102
I have an android application with different flavours.What I mean by flavours is that they differ only in their application name,icon and a url that webview in the application uses. What I have now: Application 1 with app\_name1 and icon1: { Code... myWebview.loadUrl(url1); code.. } Application 2 with app\_name2 and i...
2011/02/11
[ "https://Stackoverflow.com/questions/4973102", "https://Stackoverflow.com", "https://Stackoverflow.com/users/287280/" ]
You probably want to take a look at [Library Projects](http://developer.android.com/guide/developing/eclipse-adt.html#libraryProject). See for instance [this blog post](http://androidblogger.blogspot.com/2010/09/android-library-projects.html): > > Library Projects allow you to share some whole parts of your applicat...
You should in any case be using resources to refer to these things. So e.g ``` <application android:label="@string:app_name" android:icon="@drawable:icon"> ``` in your `AndroidManifest.xml`, and ``` String rl = getString(R.string.url); ``` in your code. Then you simply have to swap in the right `res/values/strin...
9,682,819
This is a really simple question, but I am hoping someone will be able to help me avoid extra lines of unnecessary code. I have a simple dataframe: ``` Df.1 <- data.frame(A = c(5,4,7,6,8,4),B = (c(1,5,2,4,9,1)),C=(c(2,3,NA,5,NA,9))) ``` What I want to do is produce an extra column which is the multiplication of A, B...
2012/03/13
[ "https://Stackoverflow.com/questions/9682819", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1073425/" ]
You can use `prod` which has an `na.rm` argument. To do it by row use `apply`: ``` apply(Df.1,1,prod,na.rm=TRUE) [1] 10 60 14 120 72 36 ```
As @James said, prod and apply will work, but you don't need to waste memory storing it in a separate variable, or even cbinding it ``` Df.1$D = apply(Df.1, 1, prod, na.rm=T) ``` Assigning the new variable in the data frame directly will work. ``` > Df.1 <- data.frame(A = c(5,4,7,6,8,4),B = (c(1,5,2,4,9,1)),C=(c(2,...
27,684,899
How can I can integrate JIRA with Selenium WebDriver? Actually I want to execute test cases and report pass/ fail status for each test cases in JIRA.
2014/12/29
[ "https://Stackoverflow.com/questions/27684899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3998037/" ]
Your question is very general, so my answer will follow suit. Jira isn't exactly a TCM (Test Case Manager) application, though it's certainly possible to track tests using Jira... The point being, you'd likely be looking at a fair amount of custom code work trying to get test launch/scheduling capabilities integrated....
There is any way I can add screen shot which I took while creating Jira ticket in selenium.
27,684,899
How can I can integrate JIRA with Selenium WebDriver? Actually I want to execute test cases and report pass/ fail status for each test cases in JIRA.
2014/12/29
[ "https://Stackoverflow.com/questions/27684899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3998037/" ]
I was able to work with JIRA with Selenium Web Driver based project by integrating [jira client](https://github.com/rcarz/jira-client/blob/master/README.md) as part of my utility classes. [This has nothing to do with selenium web driver] Below example tells how to log defect in JIRA if any automated test gets failed. ...
There is any way I can add screen shot which I took while creating Jira ticket in selenium.
16,157,305
I had an interesting interview question the other day, which I really struggled with. The (highly ambitious) spec required me to write, in C#, parsers for two different data streams. Here is a made-up example of the first stream: ``` 30=EUR/USD,35=3,50=ON,51=12.5,52=13.5,50=6M,51=15.4,52=16.2,50=1Y,51=17.2,52=18.3 ``...
2013/04/22
[ "https://Stackoverflow.com/questions/16157305", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25462/" ]
I don't see what's so tricky about it. However, I don't see any solution that would be better than the very specific, iteration with many conditionals solution I have in mind. First you split on commas, then you loop over those tokens, splitting each on the equal sign to get you key value pair. You have checks for eac...
30=EUR/USD,35=3,50=ON,51=12.5,52=13.5,50=6M,51=15.4,52=16.2,50=1Y,51=17.2,52=18.3 Let me try. I am not writing C# code , just giving a overview of my approach i would break this into 2 segments Chain1={P0 , P1} and Chain2={P2......PN} break evenly chain 2 based on value from P1. based on position of comma. ``` sub...