qid
int64
20k
62.9M
question
stringlengths
123
5.84k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
115
9.17k
response_k
stringlengths
44
2.88k
53,179,085
I'm writing a code using Java Swing to press the right button when I type a number key. But I can't find what I want through search. This is my code and I can't understand why this isn't working. Please help me.. ``` import javax.swing.*; import java.awt.Dimension; import java.awt.event.*; class class01 { public...
2018/11/06
[ "https://Stackoverflow.com/questions/53179085", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8933767/" ]
The code you are showing does exactly one thing: attach action listeners to your buttons.. Meaning: when you click the button, then the listener will be called. You need a generic keyboard listener that translates key events into calls to the appropriate button, respectively action listener instead.
When you do this: ``` button1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { button1.keyPressed(KeyEvent.VK_1); JOptionPane.showMessageDialog(f.getComponent(0), "Coffee selected"); } }); ``` You are telling `button1` what to do whe...
53,179,085
I'm writing a code using Java Swing to press the right button when I type a number key. But I can't find what I want through search. This is my code and I can't understand why this isn't working. Please help me.. ``` import javax.swing.*; import java.awt.Dimension; import java.awt.event.*; class class01 { public...
2018/11/06
[ "https://Stackoverflow.com/questions/53179085", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8933767/" ]
From what I understand, essentially you want to have the same operation of a button assigned to a specific key stroke. Things you want to avoid are `KeyListener`, especially because you have other focusable components in the view, namely buttons, which will steal keyboard focus and render the `KeyListener` useless. Th...
When you do this: ``` button1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { button1.keyPressed(KeyEvent.VK_1); JOptionPane.showMessageDialog(f.getComponent(0), "Coffee selected"); } }); ``` You are telling `button1` what to do whe...
213,173
I am a senior Siebel CRM developer having more than 8 years of working experience. Now, I am very keen and excited to learn Salesforce and get certified as soon as possible. Please guide me where to start from scratch ?
2018/03/29
[ "https://salesforce.stackexchange.com/questions/213173", "https://salesforce.stackexchange.com", "https://salesforce.stackexchange.com/users/55249/" ]
After some research and not reaching to any solution, I refreshed the selected Business Units by removing them, saving and the adding and saving again. This solved my issue.
You may need to raise the case with SFMC support. I have seen these issues, and support needs to toggle some backend settings to reset the SC and SFMC connection.
6,763,429
i want to write a shape with " \* " and " | " the shape is below. The program must take height and width from user.Width is column number without ' | '.I tried to write but confused.My code sometimes works great and sometimes being stupid.For example when i enter height : 13, width : 4 it writes one more,if witdh is 1 ...
2011/07/20
[ "https://Stackoverflow.com/questions/6763429", "https://Stackoverflow.com", "https://Stackoverflow.com/users/852118/" ]
I see a ``` while (Height > 0) ``` so your infinite loop is coming from Height never getting less or equal to 0.
It's better to rewrite. When you do, decouple the code into several functions so that one function draws a single line, and another one calls the former to draw all the lines.
6,763,429
i want to write a shape with " \* " and " | " the shape is below. The program must take height and width from user.Width is column number without ' | '.I tried to write but confused.My code sometimes works great and sometimes being stupid.For example when i enter height : 13, width : 4 it writes one more,if witdh is 1 ...
2011/07/20
[ "https://Stackoverflow.com/questions/6763429", "https://Stackoverflow.com", "https://Stackoverflow.com/users/852118/" ]
I see a ``` while (Height > 0) ``` so your infinite loop is coming from Height never getting less or equal to 0.
``` void WriteStars(int Width,int Height) { int _sp=1; //Star Pos bool _left = false; for(int i =0;i<Height;i++) { Console.Write("|"); int j; for(j=1;j<Width-1;j++) { if(j==_sp) { Console.Write("*"); if(_left) ...
6,763,429
i want to write a shape with " \* " and " | " the shape is below. The program must take height and width from user.Width is column number without ' | '.I tried to write but confused.My code sometimes works great and sometimes being stupid.For example when i enter height : 13, width : 4 it writes one more,if witdh is 1 ...
2011/07/20
[ "https://Stackoverflow.com/questions/6763429", "https://Stackoverflow.com", "https://Stackoverflow.com/users/852118/" ]
``` private static void WriteStars(int width, int height) { int j = 0; for (int i = 0; i < height; i++) { Console.Write("|"); for (int f = 0; f < width; f++) { if (f == Math.Abs(j)) { Console.Write("*...
I see a ``` while (Height > 0) ``` so your infinite loop is coming from Height never getting less or equal to 0.
6,763,429
i want to write a shape with " \* " and " | " the shape is below. The program must take height and width from user.Width is column number without ' | '.I tried to write but confused.My code sometimes works great and sometimes being stupid.For example when i enter height : 13, width : 4 it writes one more,if witdh is 1 ...
2011/07/20
[ "https://Stackoverflow.com/questions/6763429", "https://Stackoverflow.com", "https://Stackoverflow.com/users/852118/" ]
I see a ``` while (Height > 0) ``` so your infinite loop is coming from Height never getting less or equal to 0.
even shorter: ``` static void Variante_2(int height, int width) { byte[][] arr = new byte[height][]; int pos = 0; int mov = 1; for (int line = 0; line < height; line++) { arr[line] = new byte[width]; for (int col = 0; col < width; col++) { arr[line][col] = 45; } arr[line][pos] = 42; pos += mo...
6,763,429
i want to write a shape with " \* " and " | " the shape is below. The program must take height and width from user.Width is column number without ' | '.I tried to write but confused.My code sometimes works great and sometimes being stupid.For example when i enter height : 13, width : 4 it writes one more,if witdh is 1 ...
2011/07/20
[ "https://Stackoverflow.com/questions/6763429", "https://Stackoverflow.com", "https://Stackoverflow.com/users/852118/" ]
I see a ``` while (Height > 0) ``` so your infinite loop is coming from Height never getting less or equal to 0.
and it is possible to do it with less code: ``` static void Variante_3(int height, int width) { int pos = 1; int mov = 1; for (int line = 0; line < height; line++) { Console.WriteLine("|" + "*".PadLeft(pos, '_') + "|".PadLeft(width - pos, '_')); pos += mov; if (pos == 1 || pos =...
6,763,429
i want to write a shape with " \* " and " | " the shape is below. The program must take height and width from user.Width is column number without ' | '.I tried to write but confused.My code sometimes works great and sometimes being stupid.For example when i enter height : 13, width : 4 it writes one more,if witdh is 1 ...
2011/07/20
[ "https://Stackoverflow.com/questions/6763429", "https://Stackoverflow.com", "https://Stackoverflow.com/users/852118/" ]
``` private static void WriteStars(int width, int height) { int j = 0; for (int i = 0; i < height; i++) { Console.Write("|"); for (int f = 0; f < width; f++) { if (f == Math.Abs(j)) { Console.Write("*...
It's better to rewrite. When you do, decouple the code into several functions so that one function draws a single line, and another one calls the former to draw all the lines.
6,763,429
i want to write a shape with " \* " and " | " the shape is below. The program must take height and width from user.Width is column number without ' | '.I tried to write but confused.My code sometimes works great and sometimes being stupid.For example when i enter height : 13, width : 4 it writes one more,if witdh is 1 ...
2011/07/20
[ "https://Stackoverflow.com/questions/6763429", "https://Stackoverflow.com", "https://Stackoverflow.com/users/852118/" ]
``` private static void WriteStars(int width, int height) { int j = 0; for (int i = 0; i < height; i++) { Console.Write("|"); for (int f = 0; f < width; f++) { if (f == Math.Abs(j)) { Console.Write("*...
``` void WriteStars(int Width,int Height) { int _sp=1; //Star Pos bool _left = false; for(int i =0;i<Height;i++) { Console.Write("|"); int j; for(j=1;j<Width-1;j++) { if(j==_sp) { Console.Write("*"); if(_left) ...
6,763,429
i want to write a shape with " \* " and " | " the shape is below. The program must take height and width from user.Width is column number without ' | '.I tried to write but confused.My code sometimes works great and sometimes being stupid.For example when i enter height : 13, width : 4 it writes one more,if witdh is 1 ...
2011/07/20
[ "https://Stackoverflow.com/questions/6763429", "https://Stackoverflow.com", "https://Stackoverflow.com/users/852118/" ]
``` private static void WriteStars(int width, int height) { int j = 0; for (int i = 0; i < height; i++) { Console.Write("|"); for (int f = 0; f < width; f++) { if (f == Math.Abs(j)) { Console.Write("*...
even shorter: ``` static void Variante_2(int height, int width) { byte[][] arr = new byte[height][]; int pos = 0; int mov = 1; for (int line = 0; line < height; line++) { arr[line] = new byte[width]; for (int col = 0; col < width; col++) { arr[line][col] = 45; } arr[line][pos] = 42; pos += mo...
6,763,429
i want to write a shape with " \* " and " | " the shape is below. The program must take height and width from user.Width is column number without ' | '.I tried to write but confused.My code sometimes works great and sometimes being stupid.For example when i enter height : 13, width : 4 it writes one more,if witdh is 1 ...
2011/07/20
[ "https://Stackoverflow.com/questions/6763429", "https://Stackoverflow.com", "https://Stackoverflow.com/users/852118/" ]
``` private static void WriteStars(int width, int height) { int j = 0; for (int i = 0; i < height; i++) { Console.Write("|"); for (int f = 0; f < width; f++) { if (f == Math.Abs(j)) { Console.Write("*...
and it is possible to do it with less code: ``` static void Variante_3(int height, int width) { int pos = 1; int mov = 1; for (int line = 0; line < height; line++) { Console.WriteLine("|" + "*".PadLeft(pos, '_') + "|".PadLeft(width - pos, '_')); pos += mov; if (pos == 1 || pos =...
62,851,314
Let me explain what is happening: * Database: Oracle 19c * Apex: 19.1.0.00.15 * ORDS standalone is 19.1.0.r0921545 I did the tasks to configure an Apex Social Sign In to Microsoft AAD without almost any issue: * I created the authentication method in Apex. * I register my application and get the web credentials in A...
2020/07/11
[ "https://Stackoverflow.com/questions/62851314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13755538/" ]
I had issue like this, it seems Oracle SSL library has some bugs. Finally I implemented some Java Source for OJVM, please read my answer here: <https://stackoverflow.com/a/60152830/11272044>
In my understanding,you will need to do following(in addition to what you did) : 1. login to Apex as administrator 2. From settings, go to 'Wallet' 3. Add Wallet path(absolute path with prefix 'file://' and password you used for creating wallet Now, your problem should be solved.
62,851,314
Let me explain what is happening: * Database: Oracle 19c * Apex: 19.1.0.00.15 * ORDS standalone is 19.1.0.r0921545 I did the tasks to configure an Apex Social Sign In to Microsoft AAD without almost any issue: * I created the authentication method in Apex. * I register my application and get the web credentials in A...
2020/07/11
[ "https://Stackoverflow.com/questions/62851314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13755538/" ]
Thank you to all who post answers, but finally, after struggling for a while, I found the root cause. Actually Oracle was right after all, as Microsoft has changed the way the authentication is handled, either you are using Oauth2 or OpenID, when you use Office365 and Azure Active Directory. In this case, my organisat...
In my understanding,you will need to do following(in addition to what you did) : 1. login to Apex as administrator 2. From settings, go to 'Wallet' 3. Add Wallet path(absolute path with prefix 'file://' and password you used for creating wallet Now, your problem should be solved.
62,851,314
Let me explain what is happening: * Database: Oracle 19c * Apex: 19.1.0.00.15 * ORDS standalone is 19.1.0.r0921545 I did the tasks to configure an Apex Social Sign In to Microsoft AAD without almost any issue: * I created the authentication method in Apex. * I register my application and get the web credentials in A...
2020/07/11
[ "https://Stackoverflow.com/questions/62851314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13755538/" ]
Thank you to all who post answers, but finally, after struggling for a while, I found the root cause. Actually Oracle was right after all, as Microsoft has changed the way the authentication is handled, either you are using Oauth2 or OpenID, when you use Office365 and Azure Active Directory. In this case, my organisat...
I had issue like this, it seems Oracle SSL library has some bugs. Finally I implemented some Java Source for OJVM, please read my answer here: <https://stackoverflow.com/a/60152830/11272044>
20,576,864
I am using Omniauth in a Rails application for login, my omniauth.rb, is as show below: ``` OmniAuth.config.logger = Rails.logger Rails.application.config.middleware.use OmniAuth::Builder do provider :facebook, 'xxxxxxx', 'xxxxxxx' provider :google_oauth2, 'xxxxxxxxx','xxxxxxxx' end ``` When a user attempts t...
2013/12/13
[ "https://Stackoverflow.com/questions/20576864", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3100897/" ]
Our old friend `strace` solves this mystery. In the `fflush("cat")` case, awk quickly writes all three values while cat is still loading. When cat finishes loading, it reads all three values in sequence and writes them out at the same time. In the case of `close("cat")`, awk waits for the process to exit, at which po...
Not really something I have much experience of but the gawk manual tells us: > > fflush([filename]) > Flush any buffered output associated with filename, > which is either a file opened for writing or a shell command for > redirecting output **to a pipe** or coprocess. > > > Note that "cat" as used above is in...
946,937
I bought a Dell Studio XPS 8100 desktop back in 2010, which had Windows 7 installed and came with a partition for Dell Factory Restore. After having installed Windows 10, what happened to that partition? Did the installation get rid of it? If not and I were to use it to do a Dell Factory Restore, would it "reinstall" ...
2015/07/29
[ "https://superuser.com/questions/946937", "https://superuser.com", "https://superuser.com/users/474857/" ]
The recovery partition will not be touched nor upgraded during this process. If you did a factory restore, you would end up with Windows 7.
If you run into a problem where you cannot access your recovery partition, or the partition is deleted, you can run a tool called DSRFIX and it should restore the recovery partition.
946,937
I bought a Dell Studio XPS 8100 desktop back in 2010, which had Windows 7 installed and came with a partition for Dell Factory Restore. After having installed Windows 10, what happened to that partition? Did the installation get rid of it? If not and I were to use it to do a Dell Factory Restore, would it "reinstall" ...
2015/07/29
[ "https://superuser.com/questions/946937", "https://superuser.com", "https://superuser.com/users/474857/" ]
From what I am seeing, if there is not a system partition on the drive, only the Dell recovery partition & OS partition, then Windows 10 will alter the boot folder of that partition. This effects the PE recovery environment & will break the factory recovery. Even after reapplying the Factory.wim of windows 7 and it blu...
If you run into a problem where you cannot access your recovery partition, or the partition is deleted, you can run a tool called DSRFIX and it should restore the recovery partition.
418,342
I know I can pass parameters to java to limit the amount of memory used, but that doesn't change the application behavior. (assuming I will get an out of memory exception or similar) I would like to limit the amount of memory that solr uses. I am assuming it is as simple as setting a single configuration option, but g...
2012/08/16
[ "https://serverfault.com/questions/418342", "https://serverfault.com", "https://serverfault.com/users/107102/" ]
Check out this article, it should address your needs <http://blogs.technet.com/b/grouppolicy/archive/2009/07/30/security-filtering-wmi-filtering-and-item-level-targeting-in-group-policy-preferences.aspx> and like Joe said, yes you can use groups for computers as well
Yes, you can use a security group populated with computer accounts to filter Group Policy.
29,743,729
I am using video.js (<http://www.videojs.com/>) to build a video approval system and need to log user actions in the player. I can do this easily enough with play, pause, end etc. but have hit a problem when trying to log seeks. I want to be able to log the start and end times of any seeks within the plaback, so we kn...
2015/04/20
[ "https://Stackoverflow.com/questions/29743729", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2664914/" ]
You can listen to `timeupdate` und take the next to last value you got there before `seeking` is called as your source: ``` var previousTime = 0; var currentTime = 0; trackedPlayer.on('timeupdate', function() { previousTime = currentTime; currentTime = trackedPlayer.currentTime(); }); trackedPlayer.on('seeking...
Try with this code to know the length of video. ``` var duration = document.getElementById("duration"); var vid_duration = Math.round(document.getElementById("video").duration); //alert(vid_duration); duration.innerHTML = vid_duration; //duration.firstChild.nodeValue = vid_duration; ```
29,743,729
I am using video.js (<http://www.videojs.com/>) to build a video approval system and need to log user actions in the player. I can do this easily enough with play, pause, end etc. but have hit a problem when trying to log seeks. I want to be able to log the start and end times of any seeks within the plaback, so we kn...
2015/04/20
[ "https://Stackoverflow.com/questions/29743729", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2664914/" ]
I needed to find the same value for a project I was working on so I could determine whether or not a user was skipping forward or backward in a videojs player. Initially, I thought to save the currentTime() a user was seeking **from** on **timeupdate** then immediately removing my timeupdate listener once **seeking** ...
Try with this code to know the length of video. ``` var duration = document.getElementById("duration"); var vid_duration = Math.round(document.getElementById("video").duration); //alert(vid_duration); duration.innerHTML = vid_duration; //duration.firstChild.nodeValue = vid_duration; ```
29,743,729
I am using video.js (<http://www.videojs.com/>) to build a video approval system and need to log user actions in the player. I can do this easily enough with play, pause, end etc. but have hit a problem when trying to log seeks. I want to be able to log the start and end times of any seeks within the plaback, so we kn...
2015/04/20
[ "https://Stackoverflow.com/questions/29743729", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2664914/" ]
I know this is an old post but this is the only solution that worked for me. ``` var counter = 0; var beforeTimeChange = 0; function handleSeeking() { var timeoutTime = 300; var beforeCounter = counter + 1; if (trackedPlayer.cache_.currentTime === trackedPlayer.duration()) { return; // when video starts...
Try with this code to know the length of video. ``` var duration = document.getElementById("duration"); var vid_duration = Math.round(document.getElementById("video").duration); //alert(vid_duration); duration.innerHTML = vid_duration; //duration.firstChild.nodeValue = vid_duration; ```
29,743,729
I am using video.js (<http://www.videojs.com/>) to build a video approval system and need to log user actions in the player. I can do this easily enough with play, pause, end etc. but have hit a problem when trying to log seeks. I want to be able to log the start and end times of any seeks within the plaback, so we kn...
2015/04/20
[ "https://Stackoverflow.com/questions/29743729", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2664914/" ]
For a more accurate solution, you can listen to the events that trigger the seek such as mousedown on progress bar, left key, right key etc., and get the current time from these events. For example in version 7.10.2 you can do the following, ``` let seekStartTime; player.controlBar.progressControl.on('mousedown', () ...
Try with this code to know the length of video. ``` var duration = document.getElementById("duration"); var vid_duration = Math.round(document.getElementById("video").duration); //alert(vid_duration); duration.innerHTML = vid_duration; //duration.firstChild.nodeValue = vid_duration; ```
29,743,729
I am using video.js (<http://www.videojs.com/>) to build a video approval system and need to log user actions in the player. I can do this easily enough with play, pause, end etc. but have hit a problem when trying to log seeks. I want to be able to log the start and end times of any seeks within the plaback, so we kn...
2015/04/20
[ "https://Stackoverflow.com/questions/29743729", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2664914/" ]
I needed to find the start and end of a seeking action in my project and I used @Motorcykey answer and it worked, but there was a small bug. when I tried to seek to a time before the current time while the player was paused, the `position` didn't get updated. so I added just one line and it fixed it. I've tried other s...
Try with this code to know the length of video. ``` var duration = document.getElementById("duration"); var vid_duration = Math.round(document.getElementById("video").duration); //alert(vid_duration); duration.innerHTML = vid_duration; //duration.firstChild.nodeValue = vid_duration; ```
29,743,729
I am using video.js (<http://www.videojs.com/>) to build a video approval system and need to log user actions in the player. I can do this easily enough with play, pause, end etc. but have hit a problem when trying to log seeks. I want to be able to log the start and end times of any seeks within the plaback, so we kn...
2015/04/20
[ "https://Stackoverflow.com/questions/29743729", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2664914/" ]
You can listen to `timeupdate` und take the next to last value you got there before `seeking` is called as your source: ``` var previousTime = 0; var currentTime = 0; trackedPlayer.on('timeupdate', function() { previousTime = currentTime; currentTime = trackedPlayer.currentTime(); }); trackedPlayer.on('seeking...
I needed to find the same value for a project I was working on so I could determine whether or not a user was skipping forward or backward in a videojs player. Initially, I thought to save the currentTime() a user was seeking **from** on **timeupdate** then immediately removing my timeupdate listener once **seeking** ...
29,743,729
I am using video.js (<http://www.videojs.com/>) to build a video approval system and need to log user actions in the player. I can do this easily enough with play, pause, end etc. but have hit a problem when trying to log seeks. I want to be able to log the start and end times of any seeks within the plaback, so we kn...
2015/04/20
[ "https://Stackoverflow.com/questions/29743729", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2664914/" ]
You can listen to `timeupdate` und take the next to last value you got there before `seeking` is called as your source: ``` var previousTime = 0; var currentTime = 0; trackedPlayer.on('timeupdate', function() { previousTime = currentTime; currentTime = trackedPlayer.currentTime(); }); trackedPlayer.on('seeking...
I know this is an old post but this is the only solution that worked for me. ``` var counter = 0; var beforeTimeChange = 0; function handleSeeking() { var timeoutTime = 300; var beforeCounter = counter + 1; if (trackedPlayer.cache_.currentTime === trackedPlayer.duration()) { return; // when video starts...
29,743,729
I am using video.js (<http://www.videojs.com/>) to build a video approval system and need to log user actions in the player. I can do this easily enough with play, pause, end etc. but have hit a problem when trying to log seeks. I want to be able to log the start and end times of any seeks within the plaback, so we kn...
2015/04/20
[ "https://Stackoverflow.com/questions/29743729", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2664914/" ]
You can listen to `timeupdate` und take the next to last value you got there before `seeking` is called as your source: ``` var previousTime = 0; var currentTime = 0; trackedPlayer.on('timeupdate', function() { previousTime = currentTime; currentTime = trackedPlayer.currentTime(); }); trackedPlayer.on('seeking...
For a more accurate solution, you can listen to the events that trigger the seek such as mousedown on progress bar, left key, right key etc., and get the current time from these events. For example in version 7.10.2 you can do the following, ``` let seekStartTime; player.controlBar.progressControl.on('mousedown', () ...
29,743,729
I am using video.js (<http://www.videojs.com/>) to build a video approval system and need to log user actions in the player. I can do this easily enough with play, pause, end etc. but have hit a problem when trying to log seeks. I want to be able to log the start and end times of any seeks within the plaback, so we kn...
2015/04/20
[ "https://Stackoverflow.com/questions/29743729", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2664914/" ]
You can listen to `timeupdate` und take the next to last value you got there before `seeking` is called as your source: ``` var previousTime = 0; var currentTime = 0; trackedPlayer.on('timeupdate', function() { previousTime = currentTime; currentTime = trackedPlayer.currentTime(); }); trackedPlayer.on('seeking...
I needed to find the start and end of a seeking action in my project and I used @Motorcykey answer and it worked, but there was a small bug. when I tried to seek to a time before the current time while the player was paused, the `position` didn't get updated. so I added just one line and it fixed it. I've tried other s...
2,767,139
Can I do this in C++ (if yes, what is the syntax?): ``` void func(string* strs) { // do something } func({"abc", "cde"}); ``` I want to pass an array to a function, without instantiating it as a variable.
2010/05/04
[ "https://Stackoverflow.com/questions/2767139", "https://Stackoverflow.com", "https://Stackoverflow.com/users/187141/" ]
It can't be done in the current C++, as defined by C++03. The feature you are looking for is called "compound literals". It is present in C language, as defined by C99 (with C-specific capabilities, of course), but not in C++. A similar feature is planned for C++ as well, but it is not there yet.
I don't think you can do that in C++98, but you can with [initializer\_lists](https://stackoverflow.com/questions/2357452/stdinitializer-list-as-function-argument) in C++1x.
2,767,139
Can I do this in C++ (if yes, what is the syntax?): ``` void func(string* strs) { // do something } func({"abc", "cde"}); ``` I want to pass an array to a function, without instantiating it as a variable.
2010/05/04
[ "https://Stackoverflow.com/questions/2767139", "https://Stackoverflow.com", "https://Stackoverflow.com/users/187141/" ]
It can't be done in the current C++, as defined by C++03. The feature you are looking for is called "compound literals". It is present in C language, as defined by C99 (with C-specific capabilities, of course), but not in C++. A similar feature is planned for C++ as well, but it is not there yet.
As written, you can't do this. The function expects a pointer-to-string. Even if you were able to pass an array as a literal, the function call would generate errors because literals are considered constant (thus, the array of literals would be of type `const string*`, not `string*` as the function expects).
2,767,139
Can I do this in C++ (if yes, what is the syntax?): ``` void func(string* strs) { // do something } func({"abc", "cde"}); ``` I want to pass an array to a function, without instantiating it as a variable.
2010/05/04
[ "https://Stackoverflow.com/questions/2767139", "https://Stackoverflow.com", "https://Stackoverflow.com/users/187141/" ]
It can't be done in the current C++, as defined by C++03. The feature you are looking for is called "compound literals". It is present in C language, as defined by C99 (with C-specific capabilities, of course), but not in C++. A similar feature is planned for C++ as well, but it is not there yet.
Use a variadic function to pass in unlimited untyped information into a function. Then do whatever you want with the passed in data, such as stuffing it into an internal array. [variadic function](http://en.wikipedia.org/wiki/Variadic_function#Variadic_functions_in_C.2C_Objective-C.2C_C.2B.2B.2C_and_D)
14,559,761
I want to use `std::initializer_list`s in Visual Studio 2012 like a guy in [this example](http://musingstudio.com/2012/11/27/stdinitializer_list-an-even-better-way-to-populate-a-vector/) does. My operating system is Windows 8 x64. Therefore I lately installed the [Visual C++ Compiler November 2012 CTP](http://www.micr...
2013/01/28
[ "https://Stackoverflow.com/questions/14559761", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1079110/" ]
(I work for Microsoft and with Dinkumware to maintain VC's Standard Library implementation.) [danijar] > > I am not sure if it could be caused by the fact that I am (sadly) using the German edition of Visual Studio and the compiler update is in English. > > > Unfortunately, the English-only CTP does not support ...
As you have noticed, the November CTP is very limited in usability for at least two reasons: 1. The compiler has numerous crash-causing bugs, such as the one you discovered. 2. The C++ Standard Library was not updated with the compiler, leaving you without decent `<tuple>` and `<intializer_list>` (this includes the om...
19,995
I don't recall ever having the problem with the iron before, but it's been a few years since I used it, as I'm just getting back into some projects since my Electronics degree. I bought some solder for a new project (I need a lot) and it's lead-free: ``` 95% Tin 4% Silver 1% Copper ``` Now, I'm not sure how toleran...
2011/09/25
[ "https://electronics.stackexchange.com/questions/19995", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/5702/" ]
Your tip is dead since you have now sanded off the special coating. It will of course still get hot, but will oxidize rapidly so that solder won't wick onto it. This will make it very difficult to solder with. You say the tip is supposed to be 370C (700F), but is that temperature controlled or just some open loop gues...
A 12w iron is way under-powered for leadfree. You need a temerature-controlled iron, 40-60W minimum
38,380,164
My project demo as link: <http://jsfiddle.net/Lvc0u55v/6741/> I use AngularJS. If a movie is not found, old values should not appear in the following code ``` <form style="margin-bottom: 40px;"> <ul> <li><h2>Title: {{result().name}}</h2></li> <li><h3>Release Date: {{result().release}}</h3></li> ...
2016/07/14
[ "https://Stackoverflow.com/questions/38380164", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5257578/" ]
It would appear that the resultFactory is not being set with new values unless a film is actually found. You'll have to make sure that your resultFactory is being set even when a film does not match the user's search entry. You can simply move your resultFactory.set outside of the `if` statement and set each key to an...
You need to add this ``` var details = { name:"", release: "", length: "", description: "", rating: "" } resultFactory.set(details) ``` ...
4,583,801
This is a classical Sangaku problem, also known as old Japanese geometry problems, that I found out just recently. The figure shows a semicircle with a smaller circle and an equilateral triangle inscribed inside it. Note that the semicircle can be *any* general semicircle, but in this case it has a radius of $1$ unit. ...
2022/11/23
[ "https://math.stackexchange.com/questions/4583801", "https://math.stackexchange.com", "https://math.stackexchange.com/users/1092912/" ]
A slightly quicker step (2) skips the quadratic formula: Observe that the hypotenuse shared by your two 30-60-90 triangles has length $\frac 2{\sqrt 3} r$ (since the side lengths are proportional to $1:\sqrt 3:2$), hence $$r + \frac 2{\sqrt 3}r = 1$$ which yields $r=2\sqrt 3-3$.
Here's my approach for the problem: Please note that my answer uses a lemma that can be proven easily, that is, [the radii of two externally or internally tangent circles are collinear](https://youtu.be/0whTkdGBNn0). [![enter image description here](https://i.stack.imgur.com/R518H.png)](https://i.stack.imgur.com/R518...
6,856,491
There is a file named \*.iso, where `*` is any string (dot, numbers, alphabets, spl characters). \*.iso is located at /dm2/www/html/isos/preFCS5.3/ I want to get this filename into $filename. I know it's very simple. How can I do this in Perl?
2011/07/28
[ "https://Stackoverflow.com/questions/6856491", "https://Stackoverflow.com", "https://Stackoverflow.com/users/713200/" ]
Destructor of the Base class will be automatically called by the compiler, when your objet life time ends. you do not need to call it explicitly. ``` TMyObject::TMyObject() : TObject() ``` Does not inherit the constructor. It is called as **[Member initializer list](https://stackoverflow.com/questions/6724626/c-c...
If you destroy a `TMyObject` through a reference of type `TMyObject` you don't have to do anything. In case you have a pointer/reference of type `TObject` to a `TMyObject` things will go wrong. *Only* the `TObject` destructor will be called, not the `TMyObject` one: ``` TObject* p = new TMyObject; delete p; // Only th...
6,856,491
There is a file named \*.iso, where `*` is any string (dot, numbers, alphabets, spl characters). \*.iso is located at /dm2/www/html/isos/preFCS5.3/ I want to get this filename into $filename. I know it's very simple. How can I do this in Perl?
2011/07/28
[ "https://Stackoverflow.com/questions/6856491", "https://Stackoverflow.com", "https://Stackoverflow.com/users/713200/" ]
Destructor of the Base class will be automatically called by the compiler, when your objet life time ends. you do not need to call it explicitly. ``` TMyObject::TMyObject() : TObject() ``` Does not inherit the constructor. It is called as **[Member initializer list](https://stackoverflow.com/questions/6724626/c-c...
What's causing the confusion to you is that you can specifically mention "which" constructor of the base class you want to use as in the following example. But you can't/ don't need to specify the destructor. ``` TMyObject::TMyObject() : TObject() ``` You could use a different constructor, say `TObject (int i)` by w...
6,856,491
There is a file named \*.iso, where `*` is any string (dot, numbers, alphabets, spl characters). \*.iso is located at /dm2/www/html/isos/preFCS5.3/ I want to get this filename into $filename. I know it's very simple. How can I do this in Perl?
2011/07/28
[ "https://Stackoverflow.com/questions/6856491", "https://Stackoverflow.com", "https://Stackoverflow.com/users/713200/" ]
This can be solved at `TObject`'s level. Its destructor has to be virtual: ``` #include <Classes.hpp> class TObject { __fastcall TObject(); virtual __fastcall ~TObject(); }; ``` This way you can either do: ``` TObject * pobj = new TMyObject(); delete pobj; ``` or ``` TMyObject * pobj = new TMyObject(); d...
Destructor of the Base class will be automatically called by the compiler, when your objet life time ends. you do not need to call it explicitly. ``` TMyObject::TMyObject() : TObject() ``` Does not inherit the constructor. It is called as **[Member initializer list](https://stackoverflow.com/questions/6724626/c-c...
6,856,491
There is a file named \*.iso, where `*` is any string (dot, numbers, alphabets, spl characters). \*.iso is located at /dm2/www/html/isos/preFCS5.3/ I want to get this filename into $filename. I know it's very simple. How can I do this in Perl?
2011/07/28
[ "https://Stackoverflow.com/questions/6856491", "https://Stackoverflow.com", "https://Stackoverflow.com/users/713200/" ]
This can be solved at `TObject`'s level. Its destructor has to be virtual: ``` #include <Classes.hpp> class TObject { __fastcall TObject(); virtual __fastcall ~TObject(); }; ``` This way you can either do: ``` TObject * pobj = new TMyObject(); delete pobj; ``` or ``` TMyObject * pobj = new TMyObject(); d...
If you destroy a `TMyObject` through a reference of type `TMyObject` you don't have to do anything. In case you have a pointer/reference of type `TObject` to a `TMyObject` things will go wrong. *Only* the `TObject` destructor will be called, not the `TMyObject` one: ``` TObject* p = new TMyObject; delete p; // Only th...
6,856,491
There is a file named \*.iso, where `*` is any string (dot, numbers, alphabets, spl characters). \*.iso is located at /dm2/www/html/isos/preFCS5.3/ I want to get this filename into $filename. I know it's very simple. How can I do this in Perl?
2011/07/28
[ "https://Stackoverflow.com/questions/6856491", "https://Stackoverflow.com", "https://Stackoverflow.com/users/713200/" ]
This can be solved at `TObject`'s level. Its destructor has to be virtual: ``` #include <Classes.hpp> class TObject { __fastcall TObject(); virtual __fastcall ~TObject(); }; ``` This way you can either do: ``` TObject * pobj = new TMyObject(); delete pobj; ``` or ``` TMyObject * pobj = new TMyObject(); d...
What's causing the confusion to you is that you can specifically mention "which" constructor of the base class you want to use as in the following example. But you can't/ don't need to specify the destructor. ``` TMyObject::TMyObject() : TObject() ``` You could use a different constructor, say `TObject (int i)` by w...
5,321,883
I am very new to spring security . I picked up [this](https://rads.stackoverflow.com/amzn/click/com/1847199747) book and trying to execute the code . While I do this I am getting ``` org.springframework.beans.NotReadablePropertyException: Invalid property 'principal.username' of bean class [org.springframework.secu...
2011/03/16
[ "https://Stackoverflow.com/questions/5321883", "https://Stackoverflow.com", "https://Stackoverflow.com/users/571718/" ]
What the error message seems to be indicating is that something is trying to access a non-existent property on an `AnonymousAuthenticationToken` ; i.e. the authentication token that spring security uses when the session is not logged in. I suspect that the problem is actually occurring either in your servlet code, or ...
I am reading/following the "Spring Security 3" book. Just add the following lines to the header.jsp The problem is that principal.username does not exists if you are not logged in. ``` <div class="username"> Welcome, <sec:authorize access="isAuthenticated()"> <strong><sec:authentication property="pr...
5,321,883
I am very new to spring security . I picked up [this](https://rads.stackoverflow.com/amzn/click/com/1847199747) book and trying to execute the code . While I do this I am getting ``` org.springframework.beans.NotReadablePropertyException: Invalid property 'principal.username' of bean class [org.springframework.secu...
2011/03/16
[ "https://Stackoverflow.com/questions/5321883", "https://Stackoverflow.com", "https://Stackoverflow.com/users/571718/" ]
What the error message seems to be indicating is that something is trying to access a non-existent property on an `AnonymousAuthenticationToken` ; i.e. the authentication token that spring security uses when the session is not logged in. I suspect that the problem is actually occurring either in your servlet code, or ...
Prerequisites as follows: 1. Add spring security taglib in jsp page you want to show username, ``` <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> ``` 2. Add spring security jars, use ``` <sec:authentication property="principal" /> ``` in jsp where you want to show the username Fol...
5,321,883
I am very new to spring security . I picked up [this](https://rads.stackoverflow.com/amzn/click/com/1847199747) book and trying to execute the code . While I do this I am getting ``` org.springframework.beans.NotReadablePropertyException: Invalid property 'principal.username' of bean class [org.springframework.secu...
2011/03/16
[ "https://Stackoverflow.com/questions/5321883", "https://Stackoverflow.com", "https://Stackoverflow.com/users/571718/" ]
I am reading/following the "Spring Security 3" book. Just add the following lines to the header.jsp The problem is that principal.username does not exists if you are not logged in. ``` <div class="username"> Welcome, <sec:authorize access="isAuthenticated()"> <strong><sec:authentication property="pr...
Prerequisites as follows: 1. Add spring security taglib in jsp page you want to show username, ``` <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> ``` 2. Add spring security jars, use ``` <sec:authentication property="principal" /> ``` in jsp where you want to show the username Fol...
67,863
The skeleton description says that while it cannot speak it, it can understand the languages it knew in life. Can it not speak because of its undeath or could it learn to speak a language?
2015/08/31
[ "https://rpg.stackexchange.com/questions/67863", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/21781/" ]
If it was physically capable of speaking, it would be able to speak the languages it knew in life. It still retains its knowledge of them, so *knowing* how to speak a language is not the problem. The problem is that a skeleton lacks lips, a tongue, vocal cords, a voicebox, and lungs. Speaking is simply impossible. The...
Isn't this why we have Speak with Dead spells? The skeleton has no way of making vocalizations so cannot speak audibly but can understand language due to the magic that animates it.
67,863
The skeleton description says that while it cannot speak it, it can understand the languages it knew in life. Can it not speak because of its undeath or could it learn to speak a language?
2015/08/31
[ "https://rpg.stackexchange.com/questions/67863", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/21781/" ]
If it was physically capable of speaking, it would be able to speak the languages it knew in life. It still retains its knowledge of them, so *knowing* how to speak a language is not the problem. The problem is that a skeleton lacks lips, a tongue, vocal cords, a voicebox, and lungs. Speaking is simply impossible. The...
By RAW default, no. =================== As explained by others it has no basic, default, means of expressing language. It's not about learning the language, it's the capability of the spell/energy powering the skeleton(s). Undeath is not in itself an impediment to speech (see: Liches). Therefore you need to extrapola...
67,863
The skeleton description says that while it cannot speak it, it can understand the languages it knew in life. Can it not speak because of its undeath or could it learn to speak a language?
2015/08/31
[ "https://rpg.stackexchange.com/questions/67863", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/21781/" ]
If it was physically capable of speaking, it would be able to speak the languages it knew in life. It still retains its knowledge of them, so *knowing* how to speak a language is not the problem. The problem is that a skeleton lacks lips, a tongue, vocal cords, a voicebox, and lungs. Speaking is simply impossible. The...
<https://www.dandwiki.com/wiki/Skeleton_(5e_Race)> said > > You've managed to control the energies that sustain you to allow you speak. You can speak, read and write Common, as well as the language of your creator. A Giant Skeleton may speak Giant, a God Touched may know Celestial, a Magic Fluke may randomly grant yo...
67,863
The skeleton description says that while it cannot speak it, it can understand the languages it knew in life. Can it not speak because of its undeath or could it learn to speak a language?
2015/08/31
[ "https://rpg.stackexchange.com/questions/67863", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/21781/" ]
If it was physically capable of speaking, it would be able to speak the languages it knew in life. It still retains its knowledge of them, so *knowing* how to speak a language is not the problem. The problem is that a skeleton lacks lips, a tongue, vocal cords, a voicebox, and lungs. Speaking is simply impossible. The...
It is true, on pg 272 of the 5e Monster Manual, it states: > > They can't read, speak, emote, or communicate in any way except to nod, shake their heads, or point. > > > ... and D&D Beyond - [Skeleton entry](https://www.dndbeyond.com/monsters/skeleton) states ... > > Understands all languages it knew in life bu...
67,863
The skeleton description says that while it cannot speak it, it can understand the languages it knew in life. Can it not speak because of its undeath or could it learn to speak a language?
2015/08/31
[ "https://rpg.stackexchange.com/questions/67863", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/21781/" ]
By RAW default, no. =================== As explained by others it has no basic, default, means of expressing language. It's not about learning the language, it's the capability of the spell/energy powering the skeleton(s). Undeath is not in itself an impediment to speech (see: Liches). Therefore you need to extrapola...
Isn't this why we have Speak with Dead spells? The skeleton has no way of making vocalizations so cannot speak audibly but can understand language due to the magic that animates it.
67,863
The skeleton description says that while it cannot speak it, it can understand the languages it knew in life. Can it not speak because of its undeath or could it learn to speak a language?
2015/08/31
[ "https://rpg.stackexchange.com/questions/67863", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/21781/" ]
It is true, on pg 272 of the 5e Monster Manual, it states: > > They can't read, speak, emote, or communicate in any way except to nod, shake their heads, or point. > > > ... and D&D Beyond - [Skeleton entry](https://www.dndbeyond.com/monsters/skeleton) states ... > > Understands all languages it knew in life bu...
Isn't this why we have Speak with Dead spells? The skeleton has no way of making vocalizations so cannot speak audibly but can understand language due to the magic that animates it.
67,863
The skeleton description says that while it cannot speak it, it can understand the languages it knew in life. Can it not speak because of its undeath or could it learn to speak a language?
2015/08/31
[ "https://rpg.stackexchange.com/questions/67863", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/21781/" ]
By RAW default, no. =================== As explained by others it has no basic, default, means of expressing language. It's not about learning the language, it's the capability of the spell/energy powering the skeleton(s). Undeath is not in itself an impediment to speech (see: Liches). Therefore you need to extrapola...
<https://www.dandwiki.com/wiki/Skeleton_(5e_Race)> said > > You've managed to control the energies that sustain you to allow you speak. You can speak, read and write Common, as well as the language of your creator. A Giant Skeleton may speak Giant, a God Touched may know Celestial, a Magic Fluke may randomly grant yo...
67,863
The skeleton description says that while it cannot speak it, it can understand the languages it knew in life. Can it not speak because of its undeath or could it learn to speak a language?
2015/08/31
[ "https://rpg.stackexchange.com/questions/67863", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/21781/" ]
By RAW default, no. =================== As explained by others it has no basic, default, means of expressing language. It's not about learning the language, it's the capability of the spell/energy powering the skeleton(s). Undeath is not in itself an impediment to speech (see: Liches). Therefore you need to extrapola...
It is true, on pg 272 of the 5e Monster Manual, it states: > > They can't read, speak, emote, or communicate in any way except to nod, shake their heads, or point. > > > ... and D&D Beyond - [Skeleton entry](https://www.dndbeyond.com/monsters/skeleton) states ... > > Understands all languages it knew in life bu...
67,863
The skeleton description says that while it cannot speak it, it can understand the languages it knew in life. Can it not speak because of its undeath or could it learn to speak a language?
2015/08/31
[ "https://rpg.stackexchange.com/questions/67863", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/21781/" ]
It is true, on pg 272 of the 5e Monster Manual, it states: > > They can't read, speak, emote, or communicate in any way except to nod, shake their heads, or point. > > > ... and D&D Beyond - [Skeleton entry](https://www.dndbeyond.com/monsters/skeleton) states ... > > Understands all languages it knew in life bu...
<https://www.dandwiki.com/wiki/Skeleton_(5e_Race)> said > > You've managed to control the energies that sustain you to allow you speak. You can speak, read and write Common, as well as the language of your creator. A Giant Skeleton may speak Giant, a God Touched may know Celestial, a Magic Fluke may randomly grant yo...
30,072,278
I am having trouble with reading in a text file full of names (some are repeated) and inputting the first and last names together on 1 line. The program works and deletes repeated names but outputs them in alphabetical order with first and last names being treated as 2 different names. Am I outputting the names wrong w...
2015/05/06
[ "https://Stackoverflow.com/questions/30072278", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4110090/" ]
The `>>` operator in `partyList >> name` only reads from `partyList` until whitespace, which includes spaces, so `name` gets the values `"Daniel"`, `"Walrus"`, `"Amy"`, etc. on iteration. If you want to read one line at a time, use ``` while (std::getline(partyList, name)) ``` which gets you `"Daniel Walrus"` etc.
``` while (partyList >> name) ``` The `>>` operator is looking here for a first blank character. That's why your names are split this way.
47,278,674
I recently started study opencv. I only have a bachelor's degree on engineering. I am having a hard time of understanding these 2 morphological transformation: Black Hat, Top Hat. the official documents is [here](https://docs.opencv.org/master/d9/d61/tutorial_py_morphological_ops.html) Can some one give some advice o...
2017/11/14
[ "https://Stackoverflow.com/questions/47278674", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6898439/" ]
Hopefully you understand *”morphological opening”*. If so, the (white) Top Hat tells you the pixels that would be removed by *”opening”*. Likewise, the Black Hat tells you the pixels that would be added by *”morphological closing”*.
See the image for explanation. Simple algebra will help here. > > Top hat > > > top hat = image - opening = image - (image - false +ves) = false +ves > > Black hat > > > black hat = image - closing = image - (image - false -ves) = false -ves [Explanation](https://i.stack.imgur.com/3Y15r.jpg)
11,615,082
I'm trying to run a macro that will delete rows that don't contain a particular value in column B. Here's my code: ``` Sub deleteRows() Dim count As Integer count = Application.WorksheetFunction.CountA(Range("AF:AF")) Dim i As Integer i = 21 Do While i <= count If (Application.WorksheetFunc...
2012/07/23
[ "https://Stackoverflow.com/questions/11615082", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1512308/" ]
You may want to start by looping the other way. When you delete a line, all the previous lines are shifted. You account for this, but a reverse loop is simpler (*for me anyways*) to understand than keeping track of when I've offset the current position within the loop: `For i = count To 21 Step -1` Also, you're relyi...
This worked for me. It uses AutoFilter, does not require looping or worksheet functions. ``` Sub DeleteRows() Dim currentSheet As Excel.Worksheet Dim rngfilter As Excel.Range Dim lastrow As Long, lastcolumn As Long Set currentSheet = ActiveSheet ' get range lastrow = currentSheet.Cells(Excel.Rows.Count, "AF").End(x...
81,217
If you don't know that it has been sacrificed to idols, then it is okay, 1 Corinthians 10: > > 25Eat whatever is sold in the meat market **without raising any question** on the ground of conscience. > > > Don't ask. Just eat. > > 26For “the earth is the Lord’s, and the fullness thereof.” 27If one of the unbelie...
2023/01/31
[ "https://hermeneutics.stackexchange.com/questions/81217", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/35953/" ]
**First,** this section of scripture first appeared nearly 2,000 years ago, and was written to Christians who were surrounded by pagans who had a practice of presenting (offering) meat to their idols before taking it to the market to be sold as food. Therefore, when you ask, "Should ***we*** eat food sacrificed to idol...
The rationale for Paul's advice comes from the principle in v21; "You cannot partake of the table of the Lord and [also] of the table of demons". This follows on from vv 18-20. Israel were "partners in the altar" (v18, RSV) when they sacrificed, in that God and the worshippers both had their own shares in most of the ...
81,217
If you don't know that it has been sacrificed to idols, then it is okay, 1 Corinthians 10: > > 25Eat whatever is sold in the meat market **without raising any question** on the ground of conscience. > > > Don't ask. Just eat. > > 26For “the earth is the Lord’s, and the fullness thereof.” 27If one of the unbelie...
2023/01/31
[ "https://hermeneutics.stackexchange.com/questions/81217", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/35953/" ]
**TL;DR:** There is no reason we should care whether our food has been sacrificed to idols. The underlying idea here is whether one is committing idolatry, which is the belief that anything, other than God or his agents, has any supernatural power or attribute. Believing that a rabbit's foot provides good luck is a f...
The rationale for Paul's advice comes from the principle in v21; "You cannot partake of the table of the Lord and [also] of the table of demons". This follows on from vv 18-20. Israel were "partners in the altar" (v18, RSV) when they sacrificed, in that God and the worshippers both had their own shares in most of the ...
81,217
If you don't know that it has been sacrificed to idols, then it is okay, 1 Corinthians 10: > > 25Eat whatever is sold in the meat market **without raising any question** on the ground of conscience. > > > Don't ask. Just eat. > > 26For “the earth is the Lord’s, and the fullness thereof.” 27If one of the unbelie...
2023/01/31
[ "https://hermeneutics.stackexchange.com/questions/81217", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/35953/" ]
**First,** this section of scripture first appeared nearly 2,000 years ago, and was written to Christians who were surrounded by pagans who had a practice of presenting (offering) meat to their idols before taking it to the market to be sold as food. Therefore, when you ask, "Should ***we*** eat food sacrificed to idol...
Underlying the OP question is an issue of reconciling the attitude of Acts (and Revelation) with that of Paul. Acts and Revelation forbid eating food offered to idols. For Paul, the pagan deities are not real, and their idols have no power. So he says: > > As to the eating of food offered to idols, we know that an id...
81,217
If you don't know that it has been sacrificed to idols, then it is okay, 1 Corinthians 10: > > 25Eat whatever is sold in the meat market **without raising any question** on the ground of conscience. > > > Don't ask. Just eat. > > 26For “the earth is the Lord’s, and the fullness thereof.” 27If one of the unbelie...
2023/01/31
[ "https://hermeneutics.stackexchange.com/questions/81217", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/35953/" ]
**TL;DR:** There is no reason we should care whether our food has been sacrificed to idols. The underlying idea here is whether one is committing idolatry, which is the belief that anything, other than God or his agents, has any supernatural power or attribute. Believing that a rabbit's foot provides good luck is a f...
Underlying the OP question is an issue of reconciling the attitude of Acts (and Revelation) with that of Paul. Acts and Revelation forbid eating food offered to idols. For Paul, the pagan deities are not real, and their idols have no power. So he says: > > As to the eating of food offered to idols, we know that an id...
34,833,269
Im trying to compare 2 Lists of the type Results, and it constantly just returns the entire list of results, it doesnt seem to filter anything out. This is the code : ``` List<Results> Veranderingen = resultaten2.Except(resultaten).ToList(); foreach(Results x in Veranderingen) { Message...
2016/01/16
[ "https://Stackoverflow.com/questions/34833269", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5789654/" ]
There are two ways to compare (for equality) two `Results` objects (and all reference type objects in general): * The first way is to compare the values of the properties of the two `Results` objects. * The second way is to compare the references themselves. And by that I mean that two `Results` objects are equal if t...
I'm sure Yacoub's answer would work and is probably the preferred solution in most cases, but in case you can't modify the Results class, here is another way to do it. Define an implementation of IEqualityComparer for Results, and then pass it as the second argument of the Except method. EDIT: ``` class Results { ...
6,290,013
I have a class that takes a List in the constructor; ``` public class MyClass { private List<Structure> structures; public MyClass(List<Structure> structures) { this.structures = structures; } } ``` that I need to instantiate via reflection. How do I define the call to class.getConst...
2011/06/09
[ "https://Stackoverflow.com/questions/6290013", "https://Stackoverflow.com", "https://Stackoverflow.com/users/497087/" ]
This should work: ``` Constructor<MyClass> constructor = MyClass.class.getConstructor(List.class); ``` or ``` Constructor constructor = MyClass.class.getConstructor(new Class[]{List.class}); ``` for Java 1.4.x or less
You can find it just by passing in `List.class`. For example: ``` import java.util.*; import java.lang.reflect.*; public class Test { public static void main(String[] args) throws Exception { Class<?> clazz = MyClass.class; Constructor<?> ctor = clazz.getConstructor(List.class); ctor.newI...
15,718,694
I am trying to cast varchar to bigint. Then inserting it into an int column. I found that I am not getting expected value. Then I tried the following statements: ``` DECLARE @varData VARCHAR(50) SET @varData = '0000019.33' select cast(@varData *cast(100 as float) as bigint) select cast(@varData *cast(100 as float)...
2013/03/30
[ "https://Stackoverflow.com/questions/15718694", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2227059/" ]
please see this [Difference between numeric,float and decimal in sql server](https://stackoverflow.com/questions/1056323/difference-between-numeric-float-and-decimal-in-sql-server) For you question, you should try CAST @vardata as numeric, like this ``` SELECT CAST(CAST(@varData AS numeric(27,9)) * 100 AS bigint) `...
it happens because sql round the data, so lets say if u pick the wrong integer instead of 2.97 u will get 3. now try to imagine how much data will be lost if u want to convert just 0.000002 :) hope u understand better now ``` DECLARE @varData VARCHAR(50), @float float, @bigint bigint SET @varData = '...
76,907
What's the meaning of fasts, is it only a physical deed of abstain from food and drinks? Because often in scriptures it's listed or placed in context of prayer, repentance, mourning or done to show a certain depending on HaShem. What has a physical deed of abstaining from food and drinks has to do with all of this? It ...
2016/10/14
[ "https://judaism.stackexchange.com/questions/76907", "https://judaism.stackexchange.com", "https://judaism.stackexchange.com/users/4762/" ]
I come from the mindset that no law is strictly physical/spiritual. They blur into one another and provide benefits which merge those aspects. Fasting is powerful in a spiritual sense because you are choosing to take control of a baser instinct. Hunger is as basic as breathing or sleepiness, so by choosing to overrule...
Fasting is a way of attaining a more spiritual state/frame of mind by disconnecting from physical pleasures. This more spiritual state is more conducive to Teshuva. See Nesivos Olam: Nesiv Hateshuva chapter 7 (beginning from the second paragraph) and Derech Hashem part 4 chapter 8:5 (regarding Yom Kippur). However, to...
76,907
What's the meaning of fasts, is it only a physical deed of abstain from food and drinks? Because often in scriptures it's listed or placed in context of prayer, repentance, mourning or done to show a certain depending on HaShem. What has a physical deed of abstaining from food and drinks has to do with all of this? It ...
2016/10/14
[ "https://judaism.stackexchange.com/questions/76907", "https://judaism.stackexchange.com", "https://judaism.stackexchange.com/users/4762/" ]
R' Hirsch writes in Horeb that the purpose of all fast days is Teshuva, and gives the following explanation (ch. 33, Dayan Grunfeld's translation): > > Fasting, i.e. abstaining from all kinds of nourishment for one day, should help in mastering the animal in man, in calling a halt to striving for self-gratification a...
Fasting is a way of attaining a more spiritual state/frame of mind by disconnecting from physical pleasures. This more spiritual state is more conducive to Teshuva. See Nesivos Olam: Nesiv Hateshuva chapter 7 (beginning from the second paragraph) and Derech Hashem part 4 chapter 8:5 (regarding Yom Kippur). However, to...
40,211
Как правильно говорить "Ты хотел опята?" или "Ты хотел опят?". Есть ли какое-то правило употребления в том или ином случае?
2014/10/08
[ "https://rus.stackexchange.com/questions/40211", "https://rus.stackexchange.com", "https://rus.stackexchange.com/users/4200/" ]
Конечно "опят". Мн.ч. р.п. "Нет опят". Ещё эти грибы во множественном числе могут называться "опёнки". Ваш вопрос напомнил мне приезжих отдыхающих, которые на пляже говорят: "Я хочу раки, а ты будешь раки?". Это же изнасилование русского языка. Хотя, поразмыслив, дополню, зависит от контекста: Можно сказать, напри...
Не все так просто. "*Ты же сама приготовила из крабов, а я так люблю **крабы**!*" – цитата из всем известного фильма. Чем крабы хуже опят? Люблю крабы, хочу опята... Думаю, что оба варианта верны. Что с крабами, что с опятами.
40,211
Как правильно говорить "Ты хотел опята?" или "Ты хотел опят?". Есть ли какое-то правило употребления в том или ином случае?
2014/10/08
[ "https://rus.stackexchange.com/questions/40211", "https://rus.stackexchange.com", "https://rus.stackexchange.com/users/4200/" ]
***"Ты хочешь опят?"*** и ***"Ты хочешь опята?"*** - оба варианта возможны. Первое сейчас употребляется много чаще. Но это частота определяется не столько даже разницей в смысле (она есть, но не четкая), сколько традицией и аналогией. //====== Попробую пояснить, хотя это довольно муторно... Вообще-то вопрос э...
Правильно: ты хочешь/хотел опят (Р.п.). Неправильно: ты хочешь/хотел опята (В.п.) ПОЯСНЕНИЕ Ряд глаголов: хотеть, ждать, требовать, желать, просить - имеют колеблющуюся переходность. Это означает, что объект, которым управляет глагол, может употребляться в В.п.(переходный глагол) и в Р.п. (непереходный глагол). Вини...
40,211
Как правильно говорить "Ты хотел опята?" или "Ты хотел опят?". Есть ли какое-то правило употребления в том или ином случае?
2014/10/08
[ "https://rus.stackexchange.com/questions/40211", "https://rus.stackexchange.com", "https://rus.stackexchange.com/users/4200/" ]
Конечно "опят". Мн.ч. р.п. "Нет опят". Ещё эти грибы во множественном числе могут называться "опёнки". Ваш вопрос напомнил мне приезжих отдыхающих, которые на пляже говорят: "Я хочу раки, а ты будешь раки?". Это же изнасилование русского языка. Хотя, поразмыслив, дополню, зависит от контекста: Можно сказать, напри...
..Падежи.. В данном случае - винительный.
40,211
Как правильно говорить "Ты хотел опята?" или "Ты хотел опят?". Есть ли какое-то правило употребления в том или ином случае?
2014/10/08
[ "https://rus.stackexchange.com/questions/40211", "https://rus.stackexchange.com", "https://rus.stackexchange.com/users/4200/" ]
Правильно: ***Ты хотел опят?*** Дело в том, что существительное ОПЯТА (ед.ОПЁНОК) не совсем обычное. Оно склоняется так же, как существительные КОТЯТА, МЕДВЕЖАТА и другие одушевлённые существительные с суффиксом -ат, ят. Существительные МАСЛЁНОК - МАСЛЯТА относятся к этой же группе. ***Ср.: Ты видел котят. - Ты хотел...
Не все так просто. "*Ты же сама приготовила из крабов, а я так люблю **крабы**!*" – цитата из всем известного фильма. Чем крабы хуже опят? Люблю крабы, хочу опята... Думаю, что оба варианта верны. Что с крабами, что с опятами.
40,211
Как правильно говорить "Ты хотел опята?" или "Ты хотел опят?". Есть ли какое-то правило употребления в том или ином случае?
2014/10/08
[ "https://rus.stackexchange.com/questions/40211", "https://rus.stackexchange.com", "https://rus.stackexchange.com/users/4200/" ]
***"Ты хочешь опят?"*** и ***"Ты хочешь опята?"*** - оба варианта возможны. Первое сейчас употребляется много чаще. Но это частота определяется не столько даже разницей в смысле (она есть, но не четкая), сколько традицией и аналогией. //====== Попробую пояснить, хотя это довольно муторно... Вообще-то вопрос э...
..Падежи.. В данном случае - винительный.
40,211
Как правильно говорить "Ты хотел опята?" или "Ты хотел опят?". Есть ли какое-то правило употребления в том или ином случае?
2014/10/08
[ "https://rus.stackexchange.com/questions/40211", "https://rus.stackexchange.com", "https://rus.stackexchange.com/users/4200/" ]
Правильно: ты хочешь/хотел опят (Р.п.). Неправильно: ты хочешь/хотел опята (В.п.) ПОЯСНЕНИЕ Ряд глаголов: хотеть, ждать, требовать, желать, просить - имеют колеблющуюся переходность. Это означает, что объект, которым управляет глагол, может употребляться в В.п.(переходный глагол) и в Р.п. (непереходный глагол). Вини...
..Падежи.. В данном случае - винительный.
40,211
Как правильно говорить "Ты хотел опята?" или "Ты хотел опят?". Есть ли какое-то правило употребления в том или ином случае?
2014/10/08
[ "https://rus.stackexchange.com/questions/40211", "https://rus.stackexchange.com", "https://rus.stackexchange.com/users/4200/" ]
Не все так просто. "*Ты же сама приготовила из крабов, а я так люблю **крабы**!*" – цитата из всем известного фильма. Чем крабы хуже опят? Люблю крабы, хочу опята... Думаю, что оба варианта верны. Что с крабами, что с опятами.
..Падежи.. В данном случае - винительный.
40,211
Как правильно говорить "Ты хотел опята?" или "Ты хотел опят?". Есть ли какое-то правило употребления в том или ином случае?
2014/10/08
[ "https://rus.stackexchange.com/questions/40211", "https://rus.stackexchange.com", "https://rus.stackexchange.com/users/4200/" ]
Правильно: ***Ты хотел опят?*** Дело в том, что существительное ОПЯТА (ед.ОПЁНОК) не совсем обычное. Оно склоняется так же, как существительные КОТЯТА, МЕДВЕЖАТА и другие одушевлённые существительные с суффиксом -ат, ят. Существительные МАСЛЁНОК - МАСЛЯТА относятся к этой же группе. ***Ср.: Ты видел котят. - Ты хотел...
Правильно: ты хочешь/хотел опят (Р.п.). Неправильно: ты хочешь/хотел опята (В.п.) ПОЯСНЕНИЕ Ряд глаголов: хотеть, ждать, требовать, желать, просить - имеют колеблющуюся переходность. Это означает, что объект, которым управляет глагол, может употребляться в В.п.(переходный глагол) и в Р.п. (непереходный глагол). Вини...
40,211
Как правильно говорить "Ты хотел опята?" или "Ты хотел опят?". Есть ли какое-то правило употребления в том или ином случае?
2014/10/08
[ "https://rus.stackexchange.com/questions/40211", "https://rus.stackexchange.com", "https://rus.stackexchange.com/users/4200/" ]
Конечно "опят". Мн.ч. р.п. "Нет опят". Ещё эти грибы во множественном числе могут называться "опёнки". Ваш вопрос напомнил мне приезжих отдыхающих, которые на пляже говорят: "Я хочу раки, а ты будешь раки?". Это же изнасилование русского языка. Хотя, поразмыслив, дополню, зависит от контекста: Можно сказать, напри...
Правильно: ты хочешь/хотел опят (Р.п.). Неправильно: ты хочешь/хотел опята (В.п.) ПОЯСНЕНИЕ Ряд глаголов: хотеть, ждать, требовать, желать, просить - имеют колеблющуюся переходность. Это означает, что объект, которым управляет глагол, может употребляться в В.п.(переходный глагол) и в Р.п. (непереходный глагол). Вини...
40,211
Как правильно говорить "Ты хотел опята?" или "Ты хотел опят?". Есть ли какое-то правило употребления в том или ином случае?
2014/10/08
[ "https://rus.stackexchange.com/questions/40211", "https://rus.stackexchange.com", "https://rus.stackexchange.com/users/4200/" ]
***"Ты хочешь опят?"*** и ***"Ты хочешь опята?"*** - оба варианта возможны. Первое сейчас употребляется много чаще. Но это частота определяется не столько даже разницей в смысле (она есть, но не четкая), сколько традицией и аналогией. //====== Попробую пояснить, хотя это довольно муторно... Вообще-то вопрос э...
Не все так просто. "*Ты же сама приготовила из крабов, а я так люблю **крабы**!*" – цитата из всем известного фильма. Чем крабы хуже опят? Люблю крабы, хочу опята... Думаю, что оба варианта верны. Что с крабами, что с опятами.
14,749,629
``` <style type="text/css"> <!-- .style1 { color: #666666; font-weight: bold; } .style8 {font-size: 12px; color: #333333; } .style9 { font-size: 12px; font-weight: bold; color: #FFFFFF; } .style12 {font-size: 12px; font-weight: bold; color: #666666; } .style13 {font-size: 12px; font-weight: bold; co...
2013/02/07
[ "https://Stackoverflow.com/questions/14749629", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1684670/" ]
This is done to avoid displaying the script content in some (old) browsers which don't know about `<style>` markup. See [this](http://lachy.id.au/log/2005/05/script-comments).
Few browsers consider the `non-HTML` codes as plain text. This comment is used to guide that browser i.e the code is commented so that `browsers` will not display it as html output.
14,749,629
``` <style type="text/css"> <!-- .style1 { color: #666666; font-weight: bold; } .style8 {font-size: 12px; color: #333333; } .style9 { font-size: 12px; font-weight: bold; color: #FFFFFF; } .style12 {font-size: 12px; font-weight: bold; color: #666666; } .style13 {font-size: 12px; font-weight: bold; co...
2013/02/07
[ "https://Stackoverflow.com/questions/14749629", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1684670/" ]
that's not a comment... it's a way to hide such text block from old browsers parser (mainly IE6-) It's the same as using the [CDATA](http://en.wikipedia.org/wiki/CDATA) technique on the `<script>` tag... to **protect bad parsing of the data** from really weird engines (mainly IE) :) though the **correct way** would b...
This is done to avoid displaying the script content in some (old) browsers which don't know about `<style>` markup. See [this](http://lachy.id.au/log/2005/05/script-comments).
14,749,629
``` <style type="text/css"> <!-- .style1 { color: #666666; font-weight: bold; } .style8 {font-size: 12px; color: #333333; } .style9 { font-size: 12px; font-weight: bold; color: #FFFFFF; } .style12 {font-size: 12px; font-weight: bold; color: #666666; } .style13 {font-size: 12px; font-weight: bold; co...
2013/02/07
[ "https://Stackoverflow.com/questions/14749629", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1684670/" ]
It is an antiquated method of hiding content from browsers who are older than the standard that introduced `<style>` or `<script>` tags. There is no valid use for such a habit anymore and in fact will cause more problems than it fixes. Unless you are developing a website for peolpe living in the 1990's (like the edit...
This is done to avoid displaying the script content in some (old) browsers which don't know about `<style>` markup. See [this](http://lachy.id.au/log/2005/05/script-comments).
14,749,629
``` <style type="text/css"> <!-- .style1 { color: #666666; font-weight: bold; } .style8 {font-size: 12px; color: #333333; } .style9 { font-size: 12px; font-weight: bold; color: #FFFFFF; } .style12 {font-size: 12px; font-weight: bold; color: #666666; } .style13 {font-size: 12px; font-weight: bold; co...
2013/02/07
[ "https://Stackoverflow.com/questions/14749629", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1684670/" ]
It's a hack for older browsers that didn't support CSS/style tag... See <http://www.w3.org/TR/html4/present/styles.html#h-14.5>
Few browsers consider the `non-HTML` codes as plain text. This comment is used to guide that browser i.e the code is commented so that `browsers` will not display it as html output.
14,749,629
``` <style type="text/css"> <!-- .style1 { color: #666666; font-weight: bold; } .style8 {font-size: 12px; color: #333333; } .style9 { font-size: 12px; font-weight: bold; color: #FFFFFF; } .style12 {font-size: 12px; font-weight: bold; color: #666666; } .style13 {font-size: 12px; font-weight: bold; co...
2013/02/07
[ "https://Stackoverflow.com/questions/14749629", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1684670/" ]
that's not a comment... it's a way to hide such text block from old browsers parser (mainly IE6-) It's the same as using the [CDATA](http://en.wikipedia.org/wiki/CDATA) technique on the `<script>` tag... to **protect bad parsing of the data** from really weird engines (mainly IE) :) though the **correct way** would b...
Few browsers consider the `non-HTML` codes as plain text. This comment is used to guide that browser i.e the code is commented so that `browsers` will not display it as html output.
14,749,629
``` <style type="text/css"> <!-- .style1 { color: #666666; font-weight: bold; } .style8 {font-size: 12px; color: #333333; } .style9 { font-size: 12px; font-weight: bold; color: #FFFFFF; } .style12 {font-size: 12px; font-weight: bold; color: #666666; } .style13 {font-size: 12px; font-weight: bold; co...
2013/02/07
[ "https://Stackoverflow.com/questions/14749629", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1684670/" ]
It is an antiquated method of hiding content from browsers who are older than the standard that introduced `<style>` or `<script>` tags. There is no valid use for such a habit anymore and in fact will cause more problems than it fixes. Unless you are developing a website for peolpe living in the 1990's (like the edit...
Few browsers consider the `non-HTML` codes as plain text. This comment is used to guide that browser i.e the code is commented so that `browsers` will not display it as html output.
14,749,629
``` <style type="text/css"> <!-- .style1 { color: #666666; font-weight: bold; } .style8 {font-size: 12px; color: #333333; } .style9 { font-size: 12px; font-weight: bold; color: #FFFFFF; } .style12 {font-size: 12px; font-weight: bold; color: #666666; } .style13 {font-size: 12px; font-weight: bold; co...
2013/02/07
[ "https://Stackoverflow.com/questions/14749629", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1684670/" ]
that's not a comment... it's a way to hide such text block from old browsers parser (mainly IE6-) It's the same as using the [CDATA](http://en.wikipedia.org/wiki/CDATA) technique on the `<script>` tag... to **protect bad parsing of the data** from really weird engines (mainly IE) :) though the **correct way** would b...
It's a hack for older browsers that didn't support CSS/style tag... See <http://www.w3.org/TR/html4/present/styles.html#h-14.5>
14,749,629
``` <style type="text/css"> <!-- .style1 { color: #666666; font-weight: bold; } .style8 {font-size: 12px; color: #333333; } .style9 { font-size: 12px; font-weight: bold; color: #FFFFFF; } .style12 {font-size: 12px; font-weight: bold; color: #666666; } .style13 {font-size: 12px; font-weight: bold; co...
2013/02/07
[ "https://Stackoverflow.com/questions/14749629", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1684670/" ]
It is an antiquated method of hiding content from browsers who are older than the standard that introduced `<style>` or `<script>` tags. There is no valid use for such a habit anymore and in fact will cause more problems than it fixes. Unless you are developing a website for peolpe living in the 1990's (like the edit...
It's a hack for older browsers that didn't support CSS/style tag... See <http://www.w3.org/TR/html4/present/styles.html#h-14.5>
14,749,629
``` <style type="text/css"> <!-- .style1 { color: #666666; font-weight: bold; } .style8 {font-size: 12px; color: #333333; } .style9 { font-size: 12px; font-weight: bold; color: #FFFFFF; } .style12 {font-size: 12px; font-weight: bold; color: #666666; } .style13 {font-size: 12px; font-weight: bold; co...
2013/02/07
[ "https://Stackoverflow.com/questions/14749629", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1684670/" ]
that's not a comment... it's a way to hide such text block from old browsers parser (mainly IE6-) It's the same as using the [CDATA](http://en.wikipedia.org/wiki/CDATA) technique on the `<script>` tag... to **protect bad parsing of the data** from really weird engines (mainly IE) :) though the **correct way** would b...
It is an antiquated method of hiding content from browsers who are older than the standard that introduced `<style>` or `<script>` tags. There is no valid use for such a habit anymore and in fact will cause more problems than it fixes. Unless you are developing a website for peolpe living in the 1990's (like the edit...
43,527,850
This is my link for getting one random article using Wiki API: ``` https://en.wikipedia.org/w/api.php?%20format=json&action=query&prop=extracts&exsentences=2&exintro=&explaintext=&generator=random&grnnamespace=0 ``` I need to get from it the first two sentences of the first section, and it works pretty well. --- ...
2017/04/20
[ "https://Stackoverflow.com/questions/43527850", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7483311/" ]
There is no API to get a random category member (and using a parameter from some unrelated API module is certainly not going to help). You could screen scrape [Special:RandomInCategory](https://en.wikipedia.org/wiki/Special:RandomInCategory) (or turn it into an API module - [patches welcome](https://phabricator.wikimed...
try to use `cmlimit` to get all of the catgeorymembers, then use a programming language, like [Python](https://python.org) to request the page, then store every catgeory in an array, and use the `random` module to get a random catgeorymember from the array you stored them in. then you can use it in a link to get the sp...
41,725,613
Being new to systematic debugging, I asked myself what these three terms mean: 1. **Debugging** 2. **Profiling** 3. **Tracing** Anyone could provide definitions?
2017/01/18
[ "https://Stackoverflow.com/questions/41725613", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3757139/" ]
Well... as I was typing the tags for my question, it appeared that stack overflow already had defined the terms in the tags description. Here their definitions which I found very good: > > **[Remote debugging](https://stackoverflow.com/tags/remote-debugging/info)** is the process of running a debug session in a local...
In addition to the answer from Samuel: 1. **Debugging** is the process of looking for bugs and their cause in applications. a bug can be an error or just some unexpected behaviour (e.g. a user complains that he/she receives an error when he/she uses an invalid date format). typically a debugger is used that can pause ...
41,843,490
Everytime I get different output when I run this program. Is there any way to get consistent output with in run method only? ``` public class MultiBasic1 { public static void main(String[] args) { ChildThread th1=new ChildThread(); ChildThread th2= new ChildThread(); ChildThread th3= new C...
2017/01/25
[ "https://Stackoverflow.com/questions/41843490", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Because you're creating a new instance of `ChildThread`, each thread is allowed to access the `run` method without restriction, as there is only one thread actually accessing the method. To demonstrate how `synchronized` works, you'd need to have some kind shared resource, such as a `Object` which each thread could in...
Here there is even no need of synchronization since you are using different objects for calling the run method. Synchronization works when multiples threads of one object is in picture. Above example will be more meaningful if you do something like below. ``` public class MultiBasic1 { public static void main(S...
41,843,490
Everytime I get different output when I run this program. Is there any way to get consistent output with in run method only? ``` public class MultiBasic1 { public static void main(String[] args) { ChildThread th1=new ChildThread(); ChildThread th2= new ChildThread(); ChildThread th3= new C...
2017/01/25
[ "https://Stackoverflow.com/questions/41843490", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Why you are getting different output? Answer: synchronized requires an object on which lock is attained before entering the synchronized block or method. In this case lock is being attained on the objects on which the method is executed hence thread 1 is locking on object th1, thread 2 is locking on th2 and so on. t...
Here there is even no need of synchronization since you are using different objects for calling the run method. Synchronization works when multiples threads of one object is in picture. Above example will be more meaningful if you do something like below. ``` public class MultiBasic1 { public static void main(S...
41,843,490
Everytime I get different output when I run this program. Is there any way to get consistent output with in run method only? ``` public class MultiBasic1 { public static void main(String[] args) { ChildThread th1=new ChildThread(); ChildThread th2= new ChildThread(); ChildThread th3= new C...
2017/01/25
[ "https://Stackoverflow.com/questions/41843490", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Because you're creating a new instance of `ChildThread`, each thread is allowed to access the `run` method without restriction, as there is only one thread actually accessing the method. To demonstrate how `synchronized` works, you'd need to have some kind shared resource, such as a `Object` which each thread could in...
Why you are getting different output? Answer: synchronized requires an object on which lock is attained before entering the synchronized block or method. In this case lock is being attained on the objects on which the method is executed hence thread 1 is locking on object th1, thread 2 is locking on th2 and so on. t...
55,123,258
I have Grafana and postgres installed and connected. I use grafana to display charts of data I add to postgres. My postgres database has a table with records from multiple sources. The schema looks like this: ``` time | source | bid | ask 12:01 | bitmex | 10 | 11 12:01 | deribit| 10 | 11 12:02 | bitmex | 9 | ...
2019/03/12
[ "https://Stackoverflow.com/questions/55123258", "https://Stackoverflow.com", "https://Stackoverflow.com/users/843033/" ]
I wrote some basic example and I used your XML file.. You can examine that.. **XML file** ``` <?xml version="1.0"?> <ArrayOfInternship xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Internship> <Title>Marketing</Title> <Start>2019-03-08T00:00:00</Start> ...
One possible solution ``` XmlDocument xmldocIntern = new XmlDocument(); xmldocIntern.Load(@"InternList.xml"); var oc = new ListBox.ObjectCollection(lstBxListIntern, xmldocIntern.DocumentElement.GetElementsByTagName("Title").Cast<XmlNode>().Select(node => node.InnerText).ToArray()); ```
55,123,258
I have Grafana and postgres installed and connected. I use grafana to display charts of data I add to postgres. My postgres database has a table with records from multiple sources. The schema looks like this: ``` time | source | bid | ask 12:01 | bitmex | 10 | 11 12:01 | deribit| 10 | 11 12:02 | bitmex | 9 | ...
2019/03/12
[ "https://Stackoverflow.com/questions/55123258", "https://Stackoverflow.com", "https://Stackoverflow.com/users/843033/" ]
I think you may be having an issue with trying to get the value of the Title tag because you're trying to grab the first attribute of every XML element but the only element that has an attribute is `ArrayOfInternship`. There are a couple of ways that you could extract all of the titles from all Internship elements in ...
One possible solution ``` XmlDocument xmldocIntern = new XmlDocument(); xmldocIntern.Load(@"InternList.xml"); var oc = new ListBox.ObjectCollection(lstBxListIntern, xmldocIntern.DocumentElement.GetElementsByTagName("Title").Cast<XmlNode>().Select(node => node.InnerText).ToArray()); ```
37,742,717
I'm uploading one csv file to the server. The file is reading the data and saving into the database but, the problem with my server is the maximum execution time is 180sec. I'm unable to upload all my data in the csv within 180sec. Server is showing like"**Service is unavailable**" after 180 sec. So i decided to comple...
2016/06/10
[ "https://Stackoverflow.com/questions/37742717", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6448903/" ]
I doubt the upload itself takes 180 seconds. You should rethink your design and collect the data first and then write it to the database, maybe using bulk insert if available in cakephp.
You can extend the execution time like this. ``` ini_set('max_execution_time', 600); //600 seconds = 10 minutes ``` Put this at the top of the CSV upload script. You can change the second parameter according to your need.
37,742,717
I'm uploading one csv file to the server. The file is reading the data and saving into the database but, the problem with my server is the maximum execution time is 180sec. I'm unable to upload all my data in the csv within 180sec. Server is showing like"**Service is unavailable**" after 180 sec. So i decided to comple...
2016/06/10
[ "https://Stackoverflow.com/questions/37742717", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6448903/" ]
I doubt the upload itself takes 180 seconds. You should rethink your design and collect the data first and then write it to the database, maybe using bulk insert if available in cakephp.
Step 1 – Data Base Connection At first we need to connect to database… File Name: connection.php ``` <?php $db = mysql_connect("Database", "username", "password") or die("Could not connect."); if(!$db) die("no db"); if(!mysql_select_db("Databasename",$db)) die("No database selected."); ?> ``` Step 2 – ...
36,251,112
I have a list of files: ``` PS S:\temp> dir Directory: S:\temp Mode LastWriteTime Length Name ---- ------------- ------ ---- -a--- 3/28/2016 2:07 AM 0 00001_asdfasdfsa df.txt -a--- 3/28/2016 2:07 AM 0 00002_asdfasdfsa df - Copy (3).txt -...
2016/03/27
[ "https://Stackoverflow.com/questions/36251112", "https://Stackoverflow.com", "https://Stackoverflow.com/users/170931/" ]
You cannot use `-replace` and massage the data at the time of the substitution. Your replacement was failing as the string literal `$1` cannot be converted to integer. As discussed in a similar question: [Passing a function to Powershell's (replace) function](https://stackoverflow.com/questions/8163061/passing-a-functi...
Haha, I got an answer. ``` dir * | ?{$_.name -match '^\d{5}_.+'} | Rename-Item -NewName {(([convert]::toint32($_.name.substring(0, 5), 10) + 12).ToString("00000")) + $_.name.substring(5)} -whatif ``` Just found that I can use any code in the `-newname{}` block. But I still don't understand why my `-replace` way did ...
25,457,631
Im having a problem with my css, when my paragraph is long, I want that my text continues aligned with my test that are alongside the image. But Im not having this, Im having my text to go left when it exceeds the image height, as you see in my image. And also, I'm having a blank space, marked by the circle in my pic...
2014/08/23
[ "https://Stackoverflow.com/questions/25457631", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3026353/" ]
Just add **float:right; position:relative** for your paragraph and adjust the width of paragraph if it is positioning below the image.
Add `overflow:hidden` to your paragraph’s formatting.
25,457,631
Im having a problem with my css, when my paragraph is long, I want that my text continues aligned with my test that are alongside the image. But Im not having this, Im having my text to go left when it exceeds the image height, as you see in my image. And also, I'm having a blank space, marked by the circle in my pic...
2014/08/23
[ "https://Stackoverflow.com/questions/25457631", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3026353/" ]
You can set the left margin of `<p>` equal to the width of the image html ``` <img src="" /> <p>...</p> ``` css ``` img { float: left; width: 100px; } p { margin-left: 100px; } ```
Add `overflow:hidden` to your paragraph’s formatting.
25,457,631
Im having a problem with my css, when my paragraph is long, I want that my text continues aligned with my test that are alongside the image. But Im not having this, Im having my text to go left when it exceeds the image height, as you see in my image. And also, I'm having a blank space, marked by the circle in my pic...
2014/08/23
[ "https://Stackoverflow.com/questions/25457631", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3026353/" ]
DEMO: <http://jsfiddle.net/wL6jua0L/> ------------------------------------- Uses box-sizing:border-box, padding and negative margin. Assumes, as in the OP, that the image is fixed to 200px wide, which means with a 5px border, you add the actual width you want it since border-box includes the borders and padding. Regar...
You can set the left margin of `<p>` equal to the width of the image html ``` <img src="" /> <p>...</p> ``` css ``` img { float: left; width: 100px; } p { margin-left: 100px; } ```
25,457,631
Im having a problem with my css, when my paragraph is long, I want that my text continues aligned with my test that are alongside the image. But Im not having this, Im having my text to go left when it exceeds the image height, as you see in my image. And also, I'm having a blank space, marked by the circle in my pic...
2014/08/23
[ "https://Stackoverflow.com/questions/25457631", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3026353/" ]
DEMO: <http://jsfiddle.net/wL6jua0L/> ------------------------------------- Uses box-sizing:border-box, padding and negative margin. Assumes, as in the OP, that the image is fixed to 200px wide, which means with a 5px border, you add the actual width you want it since border-box includes the borders and padding. Regar...
You could wrap the paragraph in a div tag: ``` <img src="http://www.peacethroughpie.org/wp-content/uploads/2013/09/baked-pie.jpg"> <div><p> ... </p></div> ``` Then you could set the div to a width of 100% - width of image and float it to the right. ``` img { float: left; width: 20%; } div { display: blo...
25,457,631
Im having a problem with my css, when my paragraph is long, I want that my text continues aligned with my test that are alongside the image. But Im not having this, Im having my text to go left when it exceeds the image height, as you see in my image. And also, I'm having a blank space, marked by the circle in my pic...
2014/08/23
[ "https://Stackoverflow.com/questions/25457631", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3026353/" ]
You could wrap the paragraph in a div tag: ``` <img src="http://www.peacethroughpie.org/wp-content/uploads/2013/09/baked-pie.jpg"> <div><p> ... </p></div> ``` Then you could set the div to a width of 100% - width of image and float it to the right. ``` img { float: left; width: 20%; } div { display: blo...
Add `overflow:hidden` to your paragraph’s formatting.
25,457,631
Im having a problem with my css, when my paragraph is long, I want that my text continues aligned with my test that are alongside the image. But Im not having this, Im having my text to go left when it exceeds the image height, as you see in my image. And also, I'm having a blank space, marked by the circle in my pic...
2014/08/23
[ "https://Stackoverflow.com/questions/25457631", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3026353/" ]
DEMO: <http://jsfiddle.net/wL6jua0L/> ------------------------------------- Uses box-sizing:border-box, padding and negative margin. Assumes, as in the OP, that the image is fixed to 200px wide, which means with a 5px border, you add the actual width you want it since border-box includes the borders and padding. Regar...
Just add **float:right; position:relative** for your paragraph and adjust the width of paragraph if it is positioning below the image.
25,457,631
Im having a problem with my css, when my paragraph is long, I want that my text continues aligned with my test that are alongside the image. But Im not having this, Im having my text to go left when it exceeds the image height, as you see in my image. And also, I'm having a blank space, marked by the circle in my pic...
2014/08/23
[ "https://Stackoverflow.com/questions/25457631", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3026353/" ]
DEMO: <http://jsfiddle.net/wL6jua0L/> ------------------------------------- Uses box-sizing:border-box, padding and negative margin. Assumes, as in the OP, that the image is fixed to 200px wide, which means with a 5px border, you add the actual width you want it since border-box includes the borders and padding. Regar...
Add a div for your image in html file and add this in your css ``` #image{ width:210px; height:1000px; float:left; } ```