language
stringclasses
1 value
query
stringlengths
16
203k
source
stringclasses
20 values
metadata
stringlengths
14
99
source_name
stringclasses
20 values
stratify_key
class label
74 classes
en
I have successfully implement stopwatch, but i am not getting proper milliseconds with two digit like this mm:ss.**SS** 02:54.**12**, my code is ``` private Runnable updateTimerThread = new Runnable() { public void run() { timeMill=timeMill+100; updateTime(timeMill); stopWatchHandler.postDelayed(this, 100); } }; private void updateTime(long updatedTime) { //I want to convert this updateTime to Milliseonds like two digit 23 } ``` i have also try this `final int mill = (int) (updatedTime % 1000);` but this is always getting 10, 20, 30...etc but i want to get 10,11,12,13..so on, if you have any idea about it plz help me.
ArmelR/stack-exchange-instruction
{ "qid": 39469037 }
stackexchange
108stackexchange_4
en
Raising max minion skills What is the effect of raising max minion skills? Communication is obvious, Hunting raises the durability bonus, but the rest - is there any benefit in doing it? I am curious if max skill has any effect on skillup chance ramp up - i.e. the skillup chance in the last stretch to 110 with a max of 110 stays the same as to 100 with a max of 100, and makes lower levels easier to reach. If it's not a thing, may I propose making it a thing? Currently there's a bunch of generation items making crafting skills easier to train, but minion skill raising stays the same from gen to gen, with no way to streamline them. I understand there's a risk of trivializing minion skills this way, say with a cap of 200 getting to 100 becomes as easy as getting to 50 now, but I'm sure there is a way to balance it.
nreimers/reddit_question_best_answers
{ "index": 19406439 }
reddit_qa
97reddit_qa_4
en
> > **Possible Duplicate:** > > [Fetching all (javascript) global variables in a page](https://stackoverflow.com/questions/2226007/fetching-all-javascript-global-variables-in-a-page) > > > My application is using global variables in javascript. Is there a way to find how many of them are there? Thanks Om
ArmelR/stack-exchange-instruction
{ "qid": 14063064 }
stackexchange
107stackexchange_3
en
My apologies if this is a stupid question but if we have ``` x=3+5j ``` then `x.imag` would give its imaginary part `x.conjugate()` would give its complex conjugate. Why do we need to put a `()` to call the conjugate function? I am thinking whether `x` can be thought to be a struct in C++ `imag` is a public attribute of `x`, where `conjugate` is a member function. Is this way of thinking correct? I apologise if this makes no sense. Admittedly, my knowledge of C++ and Python are both quite limited.
ArmelR/stack-exchange-instruction
{ "qid": 40661271 }
stackexchange
108stackexchange_4
en
i have built a app based on 2.1 ..forward compatibility error occuring .Though its not showing any error on logcat still the click events are not working on any later version than android 2.1.On 2.1 it works perfectly.In my manifest i have used uses minsdk=7.
ArmelR/stack-exchange-instruction
{ "qid": 10245661 }
stackexchange
107stackexchange_3
en
Would people go far with Artificial Intelligence and machine learning to the point where machines could learn during a long period of time to distinguish what's 'good' from 'bad' according to people living in a restricted geographical area, and then the machines take control and turn what was learned into a set of 'rules' and 'laws' (think of it as an effective machine of 'politics') that match the majority of the people's view of issues. That should be accepted by everyone, since a contract set at the beginning says: "Everyone is ok".
ArmelR/stack-exchange-instruction
{ "qid": 6916 }
stackexchange
108stackexchange_4
en
is aloe vera plant good for wrinkles?
sentence-transformers/gooaq
{ "index": 1431914 }
gooaq
46gooaq_1
en
So I have many Enums in my app which get used in kotlins *when* calls. For instance my enum class ``` enum class MyFancyEnum { TYPE_A,TYPE_B, TYPE_C } ``` is used in something like this: ``` when (it){ TYPE_A -> { ... } } ``` What I need is a warning (or even better an error) in case I have forgotten to distinguish between all branches. I can see, the compiler is highlighting this already and moving the cursor on it I get a message similar to that one: > > 'when' expression on enum is recommended to be exhaustive, add '...' > branch or 'else' branch instead > > > However, there are no lint checks for this in Android Studio. (One seems to be switch-case for Java but nothing similar for Kotlin). **Question:** How can I get a Lint Warning / Error in case I forgot one branch in a when expression?
ArmelR/stack-exchange-instruction
{ "qid": 56424564 }
stackexchange
108stackexchange_4
en
Don't see the reason to Unsub though I'm pretty upset because of what he said in the commentary about women empowerment at the same time, I know it's Dylan. Though, I personally felt disrespected. Yet, I don't see the reason to unsub or anything because of that. Also, about Endgame. That was my first time watching Endgame, through the lens of Dylan, and I don't see the point in being upset because he said bad things about the movie itself. Aka: I'm separating the women thing and the movie thing. Plus, Dylan said it himself. He is behind on the movie. No refresher. Which I think was a terrible mistake but whatever (lol). That's my personal opinion on the situation. Backlash me on it or not.
nreimers/reddit_question_best_answers
{ "index": 34850307 }
reddit_qa
97reddit_qa_4
en
what is the washington nationals hand gesture?
sentence-transformers/gooaq
{ "index": 1594286 }
gooaq
47gooaq_2
en
What’s best campus ( college ) in university of Toronto ( st.g ) Hi guys ! I am currently applying rotman commerce. and i saw there are 6 categories? 1. Woodsworth college 2. Victoria college 3. University college 4. Trinity college 5. St. Michael’s college 6. New college 7. Innis college Personally, which is the best for rotman commerce ? and why is it good ? what’s advantages and disadvantages
nreimers/reddit_question_best_answers
{ "index": 48127649 }
reddit_qa
97reddit_qa_4
en
How can the direction of the electric field of a negative point charge be going in towards itself (radially), when the charge itself is *generating* the electric field? Is it generated at infinity then? Because if it's generated by the charge then it cannot go further in towards itself? In case of positive charge, it is understandable that the field is being generated at the charge (at it's surface to be precise) and is *going outwards* radially. [![negative point charge](https://i.stack.imgur.com/aHBsj.gif)](https://i.stack.imgur.com/aHBsj.gif)
ArmelR/stack-exchange-instruction
{ "qid": 317521 }
stackexchange
108stackexchange_4
en
I gave Ted Lasso a watch to day and OMG I'm so glad i did. I'm in desperate need of a light-hearted, wholesome show, and I saw Ted Lasso got a lot of raving in here, and I gave it a watch and it blew my mind. The characters are definitely out of this world, especially Ted Lasso. He gives me kinda Leslie Knope vibe but less energetic and "flamboyant". The premise of the show is so so cool, a football coach coaching soccer? Overall, I absolutely adore it and really looking forward to EP9
nreimers/reddit_question_best_answers
{ "index": 45479152 }
reddit_qa
97reddit_qa_4
en
Gen1 Window Regulators Becoming Extinct? My driver’s window dropped yesterday afternoon and wouldn’t go up. I called the seven nearest dealerships and couldn’t locate one. I was quoted from 5 business days to 10 for delivery. Some couldn’t stock it until March. Auto zone couldn’t order it. Same with O’Reillys. Finally located one about two hours ago at a Chevy dealer; fortunately, my GF was driving through there at the time. Replacement was easier than expected.
nreimers/reddit_question_best_answers
{ "index": 39042664 }
reddit_qa
97reddit_qa_4
en
For what value of real constant $a$ does the following series converge? $$ 1+(1/\sqrt{3})-(a/\sqrt{2})+(1/\sqrt{5})+(1/\sqrt{7})-(a/\sqrt{4})+(1/\sqrt{9})+(1/\sqrt{11})-(a/\sqrt{6})... $$ I do not have a clue on how to proceed. Suggest a possible route. can we do it by comparison test somehow? Can we comapre it with $c/\sqrt{(n)}$ for some $c$ and some large enough $n$?
ArmelR/stack-exchange-instruction
{ "qid": 997246 }
stackexchange
107stackexchange_3
en
How to make dyed hair look masculine? I’m thinking of getting a Mohawk although I’m a bit on the fence on it. One of the reasons I want it specifically is it seems to be one of the few styles that can be dyed without making people more on the fence about passing. I’m not on T yet so that’s why I’m worried.
nreimers/reddit_question_best_answers
{ "index": 32345281 }
reddit_qa
96reddit_qa_3
en
The edgy hard rock and metal music from the 90s and early 2000s has aged infinitely better than any other genres attached to time periods. Slipknot's discography is still a full of badass songs, early Disturbed is still a banger ((Even Down With The Sickness which ISN'T ABOUT DOMESTIC VIOLENCE despite what passive listeners think)), KoRn' s music is chock full of badass party music, same with Rob Zombie. Same with Godsmack. Same with some Papa Roach songs ((Last Resort has aged horribly)). Same with Evanescence. Compare the best of that time from the mid 2000s, or from the 80s and pre nirvana 90s. The "Edgy" stuff still holds up fairly well. I miss the fact the era of anger, angst, fury, hatred for the ones in power who never change shit, and just done with everyone's idiocy is over. I miss that music.
nreimers/reddit_question_best_answers
{ "index": 41101856 }
reddit_qa
97reddit_qa_4
en
I need 90 gigs a month of 20 down and 20 up and I have a verizon tower nearby I have the unlimited plan, which seems rather limited. I upload and download big files for work. I bought a mifi last year and it was working great until the limits were put in. Glad to pay $150 per month to have 20 down and 20 up for the full 90 gigs per month. Is there a plan that I am not seeing?
nreimers/reddit_question_best_answers
{ "index": 28076151 }
reddit_qa
97reddit_qa_4
en
Who here is hoping for a SQ42 trailer at CitCon!? I know a huge part of MY purchase of SC was for Squadron 42, the singleplayer campaign, but I have been sapped of info! I am so excited for CitCon, because everyone has said to excpect stuff from SQ42 there, and I'm hoping for a cinematic trailer! Who is with me?
nreimers/reddit_question_best_answers
{ "index": 10758882 }
reddit_qa
96reddit_qa_3
en
Bumgarner's return to SF Anybody pinpoint the exact day madison bumgarner will be pitching against San fransisco? I'm trying to buy tickets early I just dont want to get the wrong date
nreimers/reddit_question_best_answers
{ "index": 39669069 }
reddit_qa
96reddit_qa_3
en
Create several characters designs, for a fantasy feudal narrative and animation, that are based on the following trope: "Evil-looking characters who are actually morally good".
allenai/WildChat-1M
{ "conversation_hash": "af692b39d757b232ce7a03499bdc9302" }
wildchat
117wildchat_3
en
Reschedule Temple Experience Day I was recently accepted into Temple and immediately registered for Experience Temple Day. It’s tomorrow morning, but my mom is telling me that there might be a snow storm tomorrow and we won’t be able to drive out. I want to know if there’s a way for me to reschedule to a later date. And if not is it okay for me to just not show up?
nreimers/reddit_question_best_answers
{ "index": 23496502 }
reddit_qa
96reddit_qa_3
en
what does it mean when a dog throws up black?
sentence-transformers/gooaq
{ "index": 149338 }
gooaq
46gooaq_1
en
Who’s the biggest Toronto street artist? When the scene jumped off it was obviously Mo G and Smoke Dawg after drake showed loved then Pressa took over with Canada Goose but who would y’all say is the most popping and relevant Toronto artist now? Is it still Pressa or do people think he’s fallen off?
nreimers/reddit_question_best_answers
{ "index": 43971313 }
reddit_qa
96reddit_qa_3
en
To buy CCL and MMM today or wait? CCL and MMM are both very attractive buys right now. CCL pays a dividend of 6.28% and MMM pays out 4.05%. Both stocks are way down right now. Think these stocks will go much lower or is now the time to scoop these two up?
nreimers/reddit_question_best_answers
{ "index": 39868638 }
reddit_qa
96reddit_qa_3
en
This is in a way a follow up question to "[Is mocking the Indian English used by a user abusive?](https://meta.stackoverflow.com/questions/379045/is-mocking-the-indian-english-used-by-a-user-abusive)", and made in light of [an answer and comments](https://meta.stackoverflow.com/questions/291362/advice-for-non-native-english-speakers/333819#333819) given in "[Advice for non-native English speakers](https://meta.stackoverflow.com/questions/291362/advice-for-non-native-english-speakers)". [In the past](https://stackoverflow.com/posts/53755146/revisions) I have edited questions that use the term "lakh" to instead be explicitly written as a number, and the term "crore" to instead be written in millions. For those unaware: > > 1 lakh = 105 = one hundred thousand > > > 1 crore = 107 = ten million > > > So, I would make the following edits (as per the example linked): > > 5 lakh => 500,000 > > > 35 crore => 350 million > > > As editors, should we be changing these local terms to be dialect-agnostic to assist with other users answering the question, add footnotes that explain the conversion, or allow them verbatim in order to preserve the intent and avoid errors in conversion/translation? --- *Yes, I am aware I used a dialect specific notation for thousands separators (',') which is a different character in many countries ('.'), and yes I'm aware of the irony of this*
ArmelR/stack-exchange-instruction
{ "qid": 379179 }
stackexchange
109stackexchange_5
en
I have dualboot Ubuntu 12.10 & Linux Mint 14, both are clean install & updated with the latest. My wireless works flawlessly on Linux Mint but it's very unreliable on Ubuntu: every 15~20 minutes, the wireless icon still shows "connected" status but I can't go to any website. Pinging URL & IP both result in no network activities. Reboot fix the problem but it would happen again within 15~20 minutes. I really like Unity. Any idea to help make Ubuntu works for me? Or what's the different in wireless module between Linx Mint & Ubuntu? Anyway I can bring it from Linux Mint to Ubuntu?
ArmelR/stack-exchange-instruction
{ "qid": 64852 }
stackexchange
108stackexchange_4
en
I have the `In` package from [Princeton](http://introcs.cs.princeton.edu/java/stdlib/In.java.html) loaded into the same directory as my files, and I compiled it. And, I use the package in my code. But, when I use `import In;` somehow I still get an error? ``` java:7: error: '.' expected import In; ^ ``` What is the solution to this silly problem?
ArmelR/stack-exchange-instruction
{ "qid": 32418658 }
stackexchange
107stackexchange_3
en
I'm trying to search for all files given a certain string / regex value. So if I were to say search for all files that have "hello" in the name, how would I go about doing this? Ever more complex, how would I go about finding a file whose name begins with any two letters followed by a dash and then a number? I've tried the find command and that has helped in the situation of hello. I would just type `find <dir> *hello*` but this doesn't work with the regex values. If I type `find -E <dir> -regex '^[a-z]{2}-[1-9]'` nothing happens. Even if I type `find -E <dir> -regex '*[0-9]*'`, nothing happens. Could someone help me with this? Thanks in advance
ArmelR/stack-exchange-instruction
{ "qid": 303902 }
stackexchange
108stackexchange_4
en
I'm currently developing an HTML5 video player and hooked up the error event listener, however so far there has been no errors. Is there a way to fake/simulate an error, to test that it's working correctly? Perhaps a method I can call to force it to error?
ArmelR/stack-exchange-instruction
{ "qid": 37484614 }
stackexchange
107stackexchange_3
en
A few reasons why HVV really makes me rage unhealthily 1-Pretty much all of the gun characters just spam the damn roll button making playing as a lightsaber character feel so frustrating 2-The fact that characters like Vader or maul get so easily melted by the likes of lando or leia is just stupid 3- STUN STUN STUN Now I know most of these features are made to balance certain heroes, but why ? Why make gun heroes so damn frustrating to play against and call it ‘balancing’ Cus all it does is make HVV just super annoying to play. In essence, I really just hope with the new lightsaber characters being added, that a lightsaber only mode is added. I just never play as gun heroes because I find them mind numbingly boring compared to fun refreshing characters like maul or Luke.
nreimers/reddit_question_best_answers
{ "index": 28581201 }
reddit_qa
97reddit_qa_4
en
what does it mean when a man kisses your stomach?
sentence-transformers/gooaq
{ "index": 1685458 }
gooaq
47gooaq_2
en
Can some one explain keen vision to me for tankers? Why do all crew have this skill? is it worth putting into? And is it only really for AB? I only play rb and some sb and have recently been grinding with my new king tiger and trying boost the crew as efficiently as possible sorry if this is a stupid question as I am relatively new to war thunder any help would be greatly appreciated
nreimers/reddit_question_best_answers
{ "index": 48694973 }
reddit_qa
97reddit_qa_4
en
Chi Chi DeVayne confuses me... In her MTQ video, when asked why she started doing drag, she responds she started doing drag because her drag mother passed away and wanted to perpetuate de name DeVayne... But how the hell can she be her drag mother if she had not started drag yet? It may be a point of detail but it bugs me
nreimers/reddit_question_best_answers
{ "index": 12340485 }
reddit_qa
96reddit_qa_3
en
I'm trying to create a batch file that renames files inside a folder. Each one has the same naming format: `car error file (1).txt`. How can I remove the spaces from the title? I have to replace all spaces, tab and similars chars from each file and replace them with a jolly char (`|`) so I can take a string from each of the files. The error that I have is that the batch file tries to find the file with only the name `car` and obviously it doesn't exist. The `old` name doesn't need to be saved for after, so they can all be called car1, car2 and so on. ``` @ECHO OFF SETLOCAL ENABLEDELAYEDEXPANSION SET dir=C:\Users\betacom\Desktop\file\pat\SEMPREALAMENTARSEOH\ echo.>Output.csv for /f %%f in ('dir /b %dir%*.txt') do ( ::rename %%f "something.txt" ) for /f %%f in ('dir /b %dir%*.txt') do ( for /f "delims=" %%a in ('findstr \.edi %dir%%%f') do echo(%%a;;%%f)>>Output.csv ::after this row above will be: REM for /f "tokens=2 delims=|" %%a in ('findstr \.edi %dir%%%f') do echo(%%a;;%%f)>>%dir%Output.csv ) ``` current file names: > > car error file (1).txt > > car error file (2).txt > ... > > > what I need them to be: > > car1.txt > > car2.txt > ... > > >
ArmelR/stack-exchange-instruction
{ "qid": 56990329 }
stackexchange
109stackexchange_5
en
Decided to try ONE more time to fix one of these. It appears that it is actually impossible to replace the Y motor? What am I missing? I removed the bed in order to remove my Y motor. The screws for the Y motor are blocked by the belt wheels. How do I remove those? It honestly looks like I just can't.
nreimers/reddit_question_best_answers
{ "index": 52162229 }
reddit_qa
96reddit_qa_3
en
Use for thin pork chops? I got some thin cut pork chops for really cheap. I want to avoid using them as actual pork chops, because that'll use up an entire pack for one meal (feeding 4 people). Suggestions/recipes for how to get at least 2 meals out of them? (My MIL also just gave us a ton of canned.....everything. So anything that involves something that might come from a can would be amazing.)
nreimers/reddit_question_best_answers
{ "index": 13557312 }
reddit_qa
97reddit_qa_4
en
salmon-with-human-arms, salmon_walk
lmsys/lmsys-chat-1m
{ "conversation_id": "365887b471794b88b6e4d34a10f0f416" }
lmsys_chat
66lmsys_chat_1
en
I have a functional code running 2 procedures and display 2 windows separately. each procedure generates its own window. I would like to choose the procedure to be displayed or have both in a main window. the 2 options are of interest. I tried to define a window where i could call each items but since the generation of the individual windows (Mainwindow\_1 and 2) belong to a class already defining a window i don't know how to proceed to display only one window at a time upon clicking the corresponding item. ``` import logging log = logging.getLogger(__name__) log.addHandler(logging.NullHandler()) import sys import random import datetime from datetime import datetime as dt, timedelta import time from time import sleep import pandas as pd from pymeasure.log import console_log from pymeasure.display.Qt import QtGui from PyQt5.QtWidgets import * # import GUItest from pymeasure.display.windows import ManagedWindow from pymeasure.experiment import Procedure, Results from pymeasure.experiment import IntegerParameter, FloatParameter, Parameter, ListParameter class RandomProcedure_1(Procedure): iterations = IntegerParameter('Loop Iterations', default=10) delay = FloatParameter('Delay Time', units='s', default=0.2) seed = Parameter('Random Seed', default='10') mode = IntegerParameter('Measurement mode : must be 2 or 4 probes', default=2) # instruments = ListParameter('procedure to run ', ('RandomProcedure_1', 'RandomProcedure_2'), default='RandomProcedure_1') # devices under test DATA_COLUMNS = ['Mode', 'Iteration', 'Timecode', 'Elapsed', 'Random Number'] def startup(self): log.info("Setting the time of the random number generator") random.seed(self.seed) def execute(self): log.info("Starting the loop of %d iterations" % self.iterations) start = datetime.datetime.now() for i in range(self.iterations): timecode = dt.now() elapsed = (datetime.datetime.now() - start).total_seconds() data = { 'Mode': self.mode, 'Iteration': i, 'Timecode': timecode, 'Elapsed': elapsed, # 'instruments': self.instruments, 'Random Number': random.randint(1, 50) } self.emit('results', data) log.debug("Emitting results: %s" % data) sleep(self.delay) if self.should_stop(): log.warning("Caught the stop flag in the procedure") break class RandomProcedure_2(Procedure): iterations = IntegerParameter('Loop Iterations', default=15) delay = FloatParameter('Delay Time', units='s', default=0.1) seed = Parameter('Random Seed', default='40') mode = IntegerParameter('Measurement mode : must be 2 or 4 probes', default=2) # instruments = ListParameter('procedure to run ', ('RandomProcedure_1', 'RandomProcedure_2'), default='RandomProcedure_1') # devices under test DATA_COLUMNS = ['Mode', 'Iteration', 'Timecode', 'Elapsed', 'Random Number'] def startup(self): log.info("Setting the time of the random number generator") random.seed(self.seed) def execute(self): log.info("Starting the loop of %d iterations" % self.iterations) start = datetime.datetime.now() for i in range(self.iterations): timecode = dt.now() elapsed = (datetime.datetime.now() - start).total_seconds() data = { 'Mode': self.mode, 'Iteration': i, 'Timecode': timecode, 'Elapsed': elapsed, # 'instruments': self.instruments, 'Random Number': random.randint(1, 100) } self.emit('results', data) log.debug("Emitting results: %s" % data) sleep(self.delay) if self.should_stop(): log.warning("Caught the stop flag in the procedure") break class MainWindow_1(ManagedWindow): def __init__(self): super(MainWindow_1, self).__init__( procedure_class=RandomProcedure_1, inputs=['mode', 'iterations', 'delay'], displays=['mode', 'iterations', 'delay'], x_axis='Iteration', y_axis='Random Number', # sequencer=True, # Added line # sequencer_inputs=['iterations', 'delay', 'seed', 'mode'], # Added line # # inputs_in_scrollarea=True # sequence_file="gui_sequencer_example_sequence.txt", # Added line, optional ) self.setWindowTitle('RandomProcedure_1') self.count = 0 def queue(self, *, procedure=None): self.count = self.count + 1 if procedure is None: procedure = self.make_procedure() filename = '.\\test\\experiment_1\\' + str(dt.now().strftime("%m%d%Y")) + '_' + 'mode_' + str(self.count) + '.csv' # working directory log.info("Constructing the Results with a data file: %s" % filename) results = Results(procedure, filename) experiment = self.new_experiment(results) self.manager.queue(experiment) class MainWindow_2(ManagedWindow): def __init__(self): super(MainWindow_2, self).__init__( procedure_class=RandomProcedure_2, inputs=['mode', 'iterations', 'delay'], displays=['mode', 'iterations', 'delay'], x_axis='Iteration', y_axis='Random Number', # sequencer=True, # Added line # sequencer_inputs=['iterations', 'delay', 'seed', 'mode'], # Added line # # inputs_in_scrollarea=True # sequence_file="gui_sequencer_example_sequence.txt", # Added line, optional ) self.setWindowTitle('RandomProcedure_2') self.count = 0 def queue(self, *, procedure=None): self.count = self.count + 1 if procedure is None: procedure = self.make_procedure() filename = '.\\test\\experiment_2\\' + str(dt.now().strftime("%m%d%Y")) + '_' + 'mode_' + str(self.count) + '.csv' # working directory log.info("Constructing the Results with a data file: %s" % filename) results = Results(procedure, filename) experiment = self.new_experiment(results) self.manager.queue(experiment) # in this window i would like to call only one procedure upon choosing the name on the list or have both displayed in one window # as it is only one window 2 appears and i cannot trigger the queue experiemnts class Window(QWidget): def __init__(self): QWidget.__init__(self) layout = QGridLayout() self.setLayout(layout) self.listwidget = QListWidget() self.listwidget.insertItem(0, "RandomProcedure_1") self.listwidget.clicked.connect(self.MainWindow_1) self.listwidget.insertItem(1, "RandomProcedure_2") self.listwidget.clicked.connect(self.MainWindow_2) layout.addWidget(self.listwidget) # def MainWindow_1(self): window_1 = MainWindow_1() window_1.show() window_1.exec_() def MainWindow_2(self): window_1 = MainWindow_2() window_1.show() window_1.exec_() if __name__ == "__main__": app = QtGui.QApplication(sys.argv) # window_1 = MainWindow_1() # window_2 = MainWindow_2() # window_1.show() # window_2.show() screen = Window() screen.show() sys.exit(app.exec_()) ```
ArmelR/stack-exchange-instruction
{ "qid": 63302430 }
stackexchange
110stackexchange_6
en
a will for married couple?
sentence-transformers/gooaq
{ "index": 2441657 }
gooaq
46gooaq_1
en
I have a serverless application defined like this ``` service: hello_world frameworkVersion: '3' provider: name: aws runtime: python3.8 functions: hello: handler: handler.run world: handler: handler2.run url: true ``` Part of the function `hello` is to hand the function url of `world` to an external api. How can I get the function url to `hello`, as an environment variable or otherwise?
ArmelR/stack-exchange-instruction
{ "qid": 72694596 }
stackexchange
108stackexchange_4
en
How do I stop being a loser with women? Hi! I am a 23 year old guy. I've only had one girlfriend so far, and she broke up with me after a month saying it was just a rebound for her. I've never succeeded in even maintaining a friendship with any other woman, let alone date one. I've asked three other women out and all have avoided the question or just said no. I don't know what I'm doing wrong. I've tried being nice, being a douchebag and being everything in between. I'm fairly good looking too - no problems there! I currently attend an Ivy league college, have a great future ahead of me, don't drink and don't smoke. What do I do? I'm tired of being a reject. Women, please help! Any advice, any at all!
nreimers/reddit_question_best_answers
{ "index": 18232205 }
reddit_qa
97reddit_qa_4
en
While I run cucumber tests from IntelliJ IDE, it works perfectly. However when I try to run it from command prompt, after creating a runner class, the step definitions are not recognized. Below is how the code looks like: ``` import io.cucumber.junit.Cucumber; import io.cucumber.junit.CucumberOptions; import org.junit.runner.RunWith; @RunWith(Cucumber.class) @CucumberOptions( glue={"classpath:src\\test\\java"}, features = "src\\test\\resources", plugin={"pretty","html:target/site/cucumber-pretty","json:target/cucumber.json"}) public class RunCucumberTests { } ``` Below is how the project structure looks like. The 'LoginSeps' class contains the step definitions. [![enter image description here](https://i.stack.imgur.com/2XGpj.png)](https://i.stack.imgur.com/2XGpj.png) The error which is thrown is as below [ERROR] Tests run: 5, Failures: 0, Errors: 5, Skipped: 0, Time elapsed: 0.79 s <<< FAILURE! - in RunCucumberTests [ERROR] Login functionality.Login Successful Time elapsed: 0.276 s <<< ERROR! io.cucumber.junit.UndefinedStepException: The step 'I am in the login page of application' and 2 other step(s) are undefined..... Any help is much appreciated.
ArmelR/stack-exchange-instruction
{ "qid": 69192627 }
stackexchange
109stackexchange_5
en
Problems with contact photos w/ DNA (stock) I searched first, along with the droid forums and couldnt find help, so here's my issue: I spent a few hours in Photoshop making a cute personal contact icon for her. Once finished, I resized it to what I thought was an appropriate 1280x862. Herein lies my problem: crop. I can't crop any of it without cutting off a portion of the picture, so I have been trying to figure out what is the biggest dimension I can resize it to without losing the ratio? And also, what is the absolute largest dimension an image can be for a contact icon?
nreimers/reddit_question_best_answers
{ "index": 4046200 }
reddit_qa
97reddit_qa_4
en
what are the characteristics of an index fossil quizlet?
sentence-transformers/gooaq
{ "index": 1564779 }
gooaq
47gooaq_2
en
I am working on an ASP.NET MVC 4 web application. I am using [Entity Framework](https://msdn.microsoft.com/en-us/data/ef.aspx) as the data access layer, using database first approach (`.edmx` file). Currently I have a problem in join tables that are defined inside two different databases (i.e. I have two `.edmx` files). For example if I want to join tables I am performing the following query:- ``` public ActionResult AutoComplete(string term) { var tech = repository.AllFindTechnolog(term).Take(100);//Call to the first database var resources = repository.GetResources(tech.Select(a => a.IT360ID.Value).ToArray(), false);//call to the second database var query = from techItems in tech join resourcesItems in resources on techItems.IT360ID.Value equals resourcesItems.RESOURCEID // join based on db2ID orderby techItems.PartialTag select new //code goes here return Json(query, JsonRequestBehavior.AllowGet); } ``` I will have two separate calls to the database, and a join inside the application server, which is not the best performance-oriented solution. Ideally the joins will happen completely inside the database engine. I know that a stored procedure will allow me to join tables from different databases purely on the server, but I do not want to use SP because it will make my code less maintainable and less testable. So I am searching for a solution where I can do the join using entity framework and to result in a single database join?
ArmelR/stack-exchange-instruction
{ "qid": 26446145 }
stackexchange
109stackexchange_5
en
Can I recover BEP20 tokens sent to a wallet that doesnt accept them? Hi. I accidentally sent BEP20 tokens to a website called roobet which doesnt accept them. The transaction says sent but there is nothing in my wallet on the site. Is there any way i can recover my tokens??
nreimers/reddit_question_best_answers
{ "index": 52534692 }
reddit_qa
96reddit_qa_3
en
How can I load a jpg into a CBitmap where I am using visual c++ 6.0 and don't have access to CImage? thx
ArmelR/stack-exchange-instruction
{ "qid": 10088494 }
stackexchange
106stackexchange_2
en
previously I had been able to deploy my lambda functions without any problems on my own AWS account. Now, I need to deploy them on to a different AWS account where my IAM user has an AdministratorAccess permission. I've set up a role/policies for invoking lambdas the same way I did for my account. Before I deployed my code with terraform, I checked the console page for AWS lambda , and this error pops up. ![enter image description here](https://i.stack.imgur.com/1j5qp.png) Any idea why I still don't have enough permissions to access lambda even with my AdministratorAccess policy attached to my user?. Do I still need to add more policies to my user in order to access Lambda?
ArmelR/stack-exchange-instruction
{ "qid": 68961801 }
stackexchange
108stackexchange_4
en
forcetk in VisualForce Page - it works fine (below is the code). ``` forcetkClient = new forcetk.Client(); forcetkClient.setSessionToken('{!$Api.Session_ID}'); forcetkClient.apexrest('/rest-api/get', function (data, status, xhr) { data = JSON.parse(data); // ... }, function (xhr, textStatus) { console.log(xhr, "Request failed: ", textStatus); }, 'GET', params); ``` Now I'm trying to do the same in lightning:container html page ... but I'm not sure how to get the Api.Session\_ID - and then I found this: getRESTAPISessionKey (link - <https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/container_npm_getrestapisessionkey.htm>). The above code works fine in VF page, but the same in lightning:container (with getRESTAPISessionKey) is giving the below error: > > HTTP ERROR 400 Problem accessing /services/proxy. Reason: > > > > ``` > Unable to forward request due to: Stream closed > > ``` > > Any suggestions/corrections to make it work in the lightning:container?? Thanks
ArmelR/stack-exchange-instruction
{ "qid": 217098 }
stackexchange
109stackexchange_5
en
How to clean/re use buffing pads? I'm about to compound/polish my red '94 Miata; which if I remember, has single stage paint that will turn the pads red. I'll be using an orange and white hex logic pads. My question is since I'm also planning on buffing my brothers white Xterra; will the paint the pads pulled be a problem on white paint? Or should I do my brothers car first then my car? Any info will be appreciated.
nreimers/reddit_question_best_answers
{ "index": 13166566 }
reddit_qa
97reddit_qa_4
en
I know I'm probably just doing something stupid but I cannot find an example that actually shows how to call a Java method from javascript using GWT. [I've followed the documentation almost verbatim where is says:](http://www.gwtproject.org/doc/latest/DevGuideCodingBasicsJSNI.html#calling) ``` package mypackage; public class Account { private int balance = 0; public int add(int amt) { balance += amt; } public native void exportAdd() /*-{ var that = this; $wnd.add = $entry(function(amt) { [email protected]::add(I)(amt); }); }-*/; } ``` Then you can call it in JS using ``` $wnd.add(5); ``` But that results in an error for me that says "$wnd is undefined". This is my code: I export the function call ``` public native void exportPaymentProcessComplete()/*-{ var that = this; console.log('exportingPaymentProcessComplete'); $wnd.paymentProcessComplete = $entry(function(result){ [email protected]::paymentProcessComplete(Ljava/lang/String;)(result); }); }-*/; ``` I have a simple function that's being called (with a breakpoint because I've yet to get it to be called) ``` public void paymentProcessComplete(String result){ if(result != null){ } } ``` This is the tricky part and probably where I'm going wrong. The JSNI call is being made from an iframe when it loads. I think it has to do with trying to call the parent window's javascript functions but I'm not sure how to refer to the parents $wnd object. I've tried this: ``` response.getWriter().print("<script type=\"text/javascript\">parent.$wnd.paymentProcessComplete(\"SUCCESS\");</script>"); ``` Which is when I get the "$wnd is undefined" error. And also this: ``` response.getWriter().print("<script type=\"text/javascript\">parent.paymentProcessComplete(\"SUCCESS\");</script>"); ``` Which gives me a "Unable to get property 'paymentProcessComplete' of undefined or null reference". Which is basically the same error as "$wnd is undefined". Anyone have any thoughts on how to accomplish this?
ArmelR/stack-exchange-instruction
{ "qid": 38398688 }
stackexchange
109stackexchange_5
en
Should I learn Blockchain Development or Machine Learning? Hi, I am Backend Developer and I have been working in Python/Django from past two years. Now I am looking forward to learning something new to enhance my skills. I have interest in both Machine Learning and Blockchain Development. What should I learn in terms of career perceptive?
nreimers/reddit_question_best_answers
{ "index": 24071506 }
reddit_qa
96reddit_qa_3
en
Should the declaration of a HashMap always include the type e.g. ``` private HashMap<String, String> test = new HashMap<String, String>(); ``` because I see lots of examples in books where `<String, String>` is left out so we just have something like: ``` private Map test= new HashMap(); ``` Which one is 'correct'?
ArmelR/stack-exchange-instruction
{ "qid": 5999736 }
stackexchange
107stackexchange_3
en
I've found "salle de remise en forme" but it sounds like this implies something besides "garder la forme" – like it's something only out of shape people go to. Is this how to refer to a hotel fitness room?
ArmelR/stack-exchange-instruction
{ "qid": 29249 }
stackexchange
107stackexchange_3
en
Customer: "I am looking for a really fashionable dress for a party at home" Ask for follow up questions on getting information on brand, product type, color preferences of the customer
lmsys/lmsys-chat-1m
{ "conversation_id": "ab66c5819c72475da0a5c9aa8b779e3b" }
lmsys_chat
68lmsys_chat_3
en
As a Chemistry student using Google Drive, I find this irritating I use Google drive to type up notes, and, being a chemistry student and needing to write chemical formulae have a question about sub and superscripts in Google drive. The keyboard shortcut exists there to accelerate this, but hitting the Ctrl key then + and , results in the browser zooming in and ruining the formatting. Is there any way of quickly sub and superscripting numbers and text without causing the browser to zoom in and out?
nreimers/reddit_question_best_answers
{ "index": 4078038 }
reddit_qa
97reddit_qa_4
en
I'm in disagreement with a co-worker about the responsiblities of a Router. Inside of our single page application, it's my impression to have network requests (AJAX) handled via events being triggered (i.e. Backbone.Events), like so: ``` events : { 'click a#getUsers' : 'updateModels' } updateModels: function() { $.ajax(); or this.Model.fetch(); } ``` Yet it is his understanding that network requests should be handled via the router on URL change (depending on a click which changes the url like `a[href="#getThings"]` like so: ``` var App = Backbone.Router.extend({ routes: { "" : "main", "thing" : "getThings" } getThings: function() { this.newView = new NewView(); $.ajax(); // which populates the view with data } }); ``` I wanted to know what the backbone reason is for doing network requests.
ArmelR/stack-exchange-instruction
{ "qid": 19056895 }
stackexchange
108stackexchange_4
en
According to Airbus: > > ‐ After the flight crew selects reverse thrust, they must perform a full stop landing. > > > Does it really make sense to have this limitation, and why? What happens if you realise there's not enough space to land, and you've still got adequate speed?
ArmelR/stack-exchange-instruction
{ "qid": 2001 }
stackexchange
107stackexchange_3
en
fAccessWindow ("Hide", False, False) function for hiding actual access window gives compilation error number 7960 I have tried without space "fAccessWindow("Hide", False, False)" but no difference. I also have code below in a module which can be also found [here](http://www.tek-tips.com/faqs.cfm?fid=2562). I'm using Access 2010 with lowest level of macro security. Also my operating system is x64. ``` Private Declare Function IsWindowVisible Lib "user32" (ByVal hwnd As Long) As Long Dim dwReturn As Long Const SW_HIDE = 0 Const SW_SHOWNORMAL = 1 Const SW_SHOWMINIMIZED = 2 Const SW_SHOWMAXIMIZED = 3 Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, _ ByVal nCmdShow As Long) As Long Public Function fAccessWindow(Optional Procedure As String, Optional SwitchStatus As Boolean, Optional StatusCheck As Boolean) As Boolean If Procedure = "Hide" Then dwReturn = ShowWindow(Application.hWndAccessApp, SW_HIDE) End If If Procedure = "Show" Then dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWMAXIMIZED) End If If Procedure = "Minimize" Then dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWMINIMIZED) End If If SwitchStatus = True Then If IsWindowVisible(hWndAccessApp) = 1 Then dwReturn = ShowWindow(Application.hWndAccessApp, SW_HIDE) Else dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWMAXIMIZED) End If End If If StatusCheck = True Then If IsWindowVisible(hWndAccessApp) = 0 Then fAccessWindow = False End If If IsWindowVisible(hWndAccessApp) = 1 Then fAccessWindow = True End If End If End Function ```
ArmelR/stack-exchange-instruction
{ "qid": 5253056 }
stackexchange
109stackexchange_5
en
I have a function declared as: ``` int myFunction(const float** ppArr, const int n, const int m); ``` and when I call it like so: ``` float** ppArr = new float*[5]; // Some initialization of ppArr int result = myFunction(ppArr, 5, 128); <<<< Error ``` and the error is (VS 2008 Express): ``` error C2664: 'Test_myFunction.cpp' : cannot convert parameter 1 from 'float **' to 'const float **' ``` WTF? I'm casting a float\*\* to const float\*\*. What could possibly go wrong with that ? :/ Edit: Thank you for incredibly fast responses!!! :)
ArmelR/stack-exchange-instruction
{ "qid": 5408342 }
stackexchange
108stackexchange_4
en
events a and b are mutually exclusive when quizlet?
sentence-transformers/gooaq
{ "index": 2128096 }
gooaq
47gooaq_2
en
I want to have two lists of points in my class. One for the originally loaded values and second for modified values. I'm making two separate lists in my class but when I'm trying to change it by change\_points method the start\_pnts list also change it's values. I have no idea what I'm doing wrong. I'll be thankful for any help with this simple problem. ``` class Polygon : Shape { private List<Point> points = new List<Point>(); private List<Point> start_pnts = new List<Point>(); public override void add_point(Point pnt) { start_pnts.Add(pnt); points.Add(pnt); } public override void change_points(double x, double y) { for (int i = 0; i < points.Count; i++) { points[i].x = start_pnts[i].x + x; points[i].y = start_pnts[i].y + y; } } } ```
ArmelR/stack-exchange-instruction
{ "qid": 40339751 }
stackexchange
108stackexchange_4
en
Are there official laws for "when" to record sales after midnight? We develop software, and have a client making an issue of when to run reports. We have say "Monday" ending at time of actual closing (ie 2am). Should it instead always be Midnight or when the business closes?
nreimers/reddit_question_best_answers
{ "index": 16912806 }
reddit_qa
96reddit_qa_3
en
what is the difference between gdp and gni per capita?
sentence-transformers/gooaq
{ "index": 1507162 }
gooaq
47gooaq_2
en
I have been trying to figure out what is going wrong here for some time now. I have created a mockJson adapter to intercept Ajax requests. I basically just call the success method inside my adapter instead of making an Ajax call. As you can see I am using mockJson to spoof some JSON data. ``` ctor.prototype.ajax = function (config) { var jqConfig = { type: config.type, url: config.url, data: config.params || config.data, dataType: config.dataType, contentType: config.contentType, crossDomain: config.crossDomain } if (!core.isEmpty(this.defaultSettings)) { var compositeConfig = core.extend({}, this.defaultSettings); jqConfig = core.extend(compositeConfig, jqConfig); } jqConfig.success = function (data, textStatus, XHR) { var httpResponse = { data: data.results, //status: XHR.status, //getHeaders: getHeadersFn(XHR), config: config }; config.success(httpResponse); //XHR.onreadystatechange = null; //XHR.abort = null; }; jqConfig.error = function (XHR, textStatus, errorThrown) { var httpResponse = { data: XHR.responseText, status: XHR.status, getHeaders: getHeadersFn(XHR), error: errorThrown, config: config }; config.error(httpResponse); XHR.onreadystatechange = null; XHR.abort = null; }; jqConfig.success($.mockJSON.generateFromTemplate({ "results|1-1": [{ "id|+1": 1, "$type": "Campaign", "name": "Campaign Name", "startDate": "2013-12-03T00:00:00.000", "budget|1-3000": 1 }] }), null, null); }; ``` This returns a single result right now for simplicity. Next I have a custom JsonResultsAdapter as well. This is to basically map the $type property to the meta information required for entity translation: ``` function configureBreezeManager() { var jsonResultsAdapter = new breeze.JsonResultsAdapter({ name: "mockJson", extractResults: function (json) { return json.results; }, visitNode: function (node, mappingContext, nodeContext) { var entityType = node["$type"]; return { entityType: entityType }; } }); var dataService = new breeze.DataService({ serviceName: config.remoteServiceName, jsonResultsAdapter: jsonResultsAdapter, hasServerMetadata: false // don't ask the server for metadata }); var mgr = new breeze.EntityManager({ dataService: dataService }); model.configureMetadataStore(mgr.metadataStore); //are we debugging? Lets use mockJson if (config.debugEnabled()) breeze.config.initializeAdapterInstance("ajax", "mockJson", true); return mgr; } ``` Lastly, I have my metadata model object being created and called before my query : ``` function configureMetadataStore(metadataStore) { addLookupTypes(metadataStore); addCampaignType(metadataStore); addMessageType(metadataStore); metadataStore.setEntityTypeForResourceName('Campaigns', 'Campaign'); metadataStore.setEntityTypeForResourceName('Messages', 'Message'); metadataStore.setEntityTypeForResourceName('Demos', 'Demo'); referenceCheckValidator = createReferenceCheckValidator(); Validator.register(referenceCheckValidator); log('Validators registered'); } function addCampaignType(store) { store.addEntityType({ shortName: "Campaign", namespace: "My.Models", dataProperties: { id: { dataType: DataType.Int32, isNullable: false, isPartOfKey: true }, name: { dataType: DataType.String, maxLength: 30, isNullable: false } } }); store.registerEntityTypeCtor("Campaign", null, campaignInitializer); } function campaignInitializer(campaign) { campaign.errorMessage = ko.observable(); campaign.startDateFormatted = ko.computed(function () { return moment(campaign.startDate()).format("MM-DD-YYYY"); }); } ``` My query : ``` var query = EntityQuery.from('Campaigns'). select('id, name, startDate, budget') .orderBy(orderBy.campaign); ``` First off, I didn't think I would need a custom JsonResultsAdapter if I am basically spoofing data in the form of a normal WebApi response, but alas I set it up based on some StackOverflow posts. The problem I am having are the Entities being returned are not having the properties wrapped as knockout observables. Later code is failing because of this and I will not be able to utilize all the aspects of breeze without this happening. Any help here would be greatly appreciated!
ArmelR/stack-exchange-instruction
{ "qid": 21057612 }
stackexchange
110stackexchange_6
en
Want to help noobs but.. Gave a guy a full sorc setup yesterday. Just basic stuff. Occy, vmagi, pcrown, etc. He said he just started a few days ago and wanted to mf. All the stuff I gave him probably added up to 100fg or less. Felt great at first but then I saw a guy selling a full "starter" sorc on jsp and the item list looked very suspicious. I tell him I'll bin (buy it now) and when I join his game IT'S THE GUY I JUST GAVE THE STUFF TO! He had a few hundred fgs too.. I want to help people get started but my motivation really decreases when people do stuff like that
nreimers/reddit_question_best_answers
{ "index": 23676903 }
reddit_qa
97reddit_qa_4
en
I sleep at 9pm and wake up at 4am, take a cup of warm water and I will do some simple exercises very slowly, then some house work. At 5am, I run for 30min with the speed 9km/hr (so it is a 4.5km run). I take a shower and I feel very good and energetic. After a breakfast with high protein, sometimes I will fell a little bit sleepy. But if I go out to have some fresh air, everything is great. I take the lunch almost between 10:50-11:30am, then a 10min slow walk. *I take a 20-30min (depending on if I am very tired) siesta at 12pm. When I wake up with some easy exercises, I still feel the body and brain are not so fully awake. And my heart rate is a little fast.* I think I can wake my body if I run for a while, say 3km. But I don't want to run at 12h30pm or 1pm. Also, it is not convenient to run in the campus. Furthermore, I prefer to run at 5pm or 5:30pm. *Do you have any idea how to be energetic after a 20-30 min siesta (afternoon nap)?*
ArmelR/stack-exchange-instruction
{ "qid": 11886 }
stackexchange
108stackexchange_4
en
The end of the campaign So I finished dming my first campaign ever last night. And I feel kinda... empty today. Is this something everyone goes through? Any tips on getting back to normal?
nreimers/reddit_question_best_answers
{ "index": 45109799 }
reddit_qa
96reddit_qa_3
en
I am trying to understand quadratic integer rings. The following is assuming $d$ is square-free. From my understanding so far: $\mathbb Z\big[\sqrt d\big]$ is an integral domain. $\mathbb Q\big[\sqrt d\big]$ is a field. $\mathbb Q\big[\sqrt d\big]$ is the field of fractions of $\mathbb Z\big[\sqrt d\big]$. $\mathbb Z\big[\sqrt d\big]$ is the ring of quadratic integers when $d \equiv 2,3 \pmod 4$. $\mathbb Z \left[\frac{1+\sqrt d}{2} \right]$ is the ring of quadratic integers when $d \equiv 1 \pmod 4$. Why isn't $\mathbb Z\big[\sqrt d\big]$ a quadratic integer ring when $d \equiv 1 \pmod 4$?
ArmelR/stack-exchange-instruction
{ "qid": 1276375 }
stackexchange
108stackexchange_4
en
what is the difference between banana republic and banana republic factory store?
sentence-transformers/gooaq
{ "index": 2923129 }
gooaq
47gooaq_2
en
The portrait of Madam Black This just occured to me, I know there's a permanent sticking charm on her portrait. Why not just remove the section of the wall with the portrait on? Shouldn't be too expensive to fix a wall that has a medium sized hole in it?
nreimers/reddit_question_best_answers
{ "index": 7813872 }
reddit_qa
96reddit_qa_3
en
Suppose two seating arrangements are considered equivalent if one can be obtained from the other by rotation. How many equivalence classes are there? I'm having trouble understanding the problem conceptually, can someone explain it in an intuitive and succinct manner?
ArmelR/stack-exchange-instruction
{ "qid": 261325 }
stackexchange
107stackexchange_3
en
Consider the following snippet: ``` >>> def foo(port, out, udp=False, ipv6=False, data=''): ... if not data: ... data = 'foo {family} {:port} {direction}'.format( ... family=('ipv6' if ipv6 else 'ipv4'), ... port=port, ... direction=('out' if out else 'in')) ... return data ... >>> foo(12345, out=True) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<stdin>", line 6, in foo IndexError: tuple index out of range ``` As far as I know, the scoping of names look alright. What's with the cryptic error?
ArmelR/stack-exchange-instruction
{ "qid": 3722771 }
stackexchange
108stackexchange_4
en
Let me give you example of what I mean by a long list of pages: ![List of Pages](https://i.imgur.com/2OKF6.png) So when you click 19 it has to determine how many new pages to show and how many old pages not to show. For example: ![List 2](https://i.imgur.com/BgZAT.png) How many new pages should you should and how many old pages should you not show?
ArmelR/stack-exchange-instruction
{ "qid": 325 }
stackexchange
107stackexchange_3
en
I am trying to delete the excel file from a specipic location . but can't deleting. having error : Access to the path 'C:\mypath\sample.xlsx' is denied. I write a code as : ``` protected void imgbtnImport_Click(object sender, ImageClickEventArgs e) { try { string strApplicationPath = HttpContext.Current.Request.MapPath(HttpContext.Current.Request.ApplicationPath); string strXLStoredDirectoryPath = strApplicationPath + "/Information Documents/"; DirectoryInfo di = new DirectoryInfo(strXLStoredDirectoryPath); string fileName = flUpldSelectFile.FileName; if (!File.Exists(strXLStoredDirectoryPath)) { Directory.CreateDirectory(strXLStoredDirectoryPath); di.Attributes = FileAttributes.Normal; } string strCreateXLFileDestinationPath = strXLStoredDirectoryPath + fileName; if (File.Exists(strCreateXLFileDestinationPath)) { File.Delete(strCreateXLFileDestinationPath); } flUpldSelectFile.SaveAs(strCreateXLFileDestinationPath); di.Attributes = FileAttributes.ReadOnly; } catch (Exception) { throw; } } ``` please guide......... -\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* Still problem there . it is not resolved . getting UnauthorizedAccessException. as access denied to deleting file. I m tired now . please help; I tried many things..please help -\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* Is may be iffect of VSS ? i am using that
ArmelR/stack-exchange-instruction
{ "qid": 2318678 }
stackexchange
109stackexchange_5
en
I will have half a day to spend in Berlin, on a Saturday afternoon. What do you recommend I should go and see/taste? I am not aiming for classical "tourist" spots, as we have a guided city tour before, hopefully it will show all the interesting spots, but much more the the things that are not so obviously on the must see and do, but they are still interesting. I am interested in going to **an antique shop or two, to a food shop (where i can buy Lebkuchen and good German sausages) and I really enjoy the hidden architecture gems of old houses. Nothing new, nothing fancy, nothing modern.** I'd like to skip the museums and galleries, I have the tendency to spend in there too much time, which I don't have with this occasion. **Also, can someone recommend a Toy store in the area around the Tiergarten?**
ArmelR/stack-exchange-instruction
{ "qid": 12860 }
stackexchange
108stackexchange_4
en
are cartier watches swiss made?
sentence-transformers/gooaq
{ "index": 1595983 }
gooaq
46gooaq_1
en
Given the document below, you have to determine if "Yes" or "No", the summary is factually consistent with the document. Document: SECTION 1. SHORT TITLE. This Act may be cited as the ``Welfare Fairness Act''. SEC. 2. FINDINGS. The Congress find that-- (1) the Wisconsin State Legislature has passed legislation calling upon the Congress of the United States to provide for Federal establishment of benefit levels for aid to families with dependent children (AFDC); (2) the current variation in benefit levels from State to State has discouraged families receiving AFDC from remaining in their home communities, although it is generally in the best interest of all citizens to live close to their families, friends, and support networks, and where job opportunities exist, and decisions on where to live should not be complicated by the level of AFDC benefits; (3) under the current system, taxpayers in States are paying differing amounts, with some States providing comparatively more in AFDC benefits while others are paying well beneath the level of poverty; and (4) because poverty does not know State boundaries, and because of the current disparities in the system for both taxpayers and AFDC recipients, uniform AFDC benefits should be determined federally. SEC. Summary: 1. Welfare Fairness Act - Establishes the Commission on Welfare Fairness to establish a uniform standard of need for recipients of Aid to Families with Dependent Children (AFDC) under part B of title IV of the Social Security Act, and provide for appropr
lmsys/lmsys-chat-1m
{ "conversation_id": "21b540d841d94d629a575f810598cb6a" }
lmsys_chat
70lmsys_chat_5
en
I have async issue with my below query. I have singleton context and i am trying to execute below query: ``` var query = await (from parent in Context.ParentTable join child in Context.ChildTable on parent.ID equals child.ID into allResult from ResultValue in allResult.DefaultIfEmpty() where ResultValue.TenantId == tenantId select new Result { Code = parent.Code, Type = parent.Type, ID = ResultValue == null ? 0 : ResultValue.Id }).ToListAsync(); ``` My singleton context looks like this: ``` public class BaseRepository { private readonly IConfigurationContextFactory configurationContextFactory; private IConfigurationContext context; protected IConfigurationContext Context { get { return context ?? (context = configurationContextFactory.Context); } } public BaseRepository(IConfigurationContextFactory configurationContextFactory) { this.configurationContextFactory = configurationContextFactory; } } ``` The configuration context factory returns Context like this: ``` private ConfigurationContext Get() { logger.WriteEntrySync(LogLevel.Information, null != context ? "Config Context: Using existing context." : "Config Context: Wiil create new context."); return context ?? (context = new ConfigurationContext(connectionString)); } ``` In this i get intermittent issue with following error: > > A second operation started on this context before a previous > asynchronous operation completed. Use 'await' to ensure that any > asynchronous operations have completed before calling another method > on this context. Any instance members are not guaranteed to be thread > safe. > > >
ArmelR/stack-exchange-instruction
{ "qid": 29763732 }
stackexchange
109stackexchange_5
en
Here is my php script ``` <?php $pubfile = fopen("public_key.pem", "r"); $public = fread($pubfile, 8192); fclose($pubfile); openssl_get_publickey($public); $prifile = fopen("private_key.pem", "r"); $private = fread($prifile, 8192); fclose($prifile); openssl_get_privatekey($private); $plaintext = "hello"; openssl_public_encrypt ($plaintext , $crypted , $public); openssl_private_decrypt($crypted, $decrypted, $private); echo $decrypted; ?> ``` my respective public and private keys private\_key.pem ``` -----BEGIN RSA PRIVATE KEY----- MIIEowIBAAKCAQEAtwxvPpbvbeJCztWlQCC0w2mQTNICarpIkbFTzlEooXA8Zo30 sN9cdH0Ifa/pIhfx0Lbm+e03Fz5NZelJZ5QRiRfoN9tcb5zYrwvVWx1SR6Zo5moS S5YEvVSWVpu3D7x3IO2XVtTHlWTTRZk2c+ZuFR3eIwDZbmuOiTmuJMQCJiRd8pqf 4sVCoKzWrUmBuT2pc/sdUQ4IPylGK3yGVyxHNa8gCkBs/zVq3I0Zu7Nx8mW8DTn9 EvP02mkFHynJZgKE0SJftu6Mp9BDl4qR4T8896K+Z1Fi3qx3iK6nkjYjXCYYZB90 6uWiqm7BK/4zbzuc604+BZ4LOPgCsO+aZjx3ywIDAQABAoIBABgTfp5Q4/UkCX2D BFVG9/+r5trz1HWNQvZGyKseaaWySX+DtGd/OX3o5DED7joZxCibpg3BcbmQ7EU3 RfxlsVjC2DxgkevsSWPcvpdZZ/UcojeMRBPFC6KLeaqymIVtWI3wMjOtkQLJXDCP UmY0LM6COzGHbxHi+8B44brcPRwe+zJK5ALhPfFEyPsnz9Rw2PLBWceXNeZYN0ja C699r+a/t0kdJ0+49LLTvFjFECZLArZTK1GZbzACeM/fFl7XvK3tsdAkizys0Dwl eyDtINkWlg+hzt8uijVY78MvP36RM8k4QIjSX/2p/jupsyZD4I2R9OW+ml9sImok Ud5YKaECgYEA7xbLLvZ5ddpf/yBSVpGytfU/PzWK5L9cPRbrQPll6iKgimAOTULi VQAQYaCDL/er/zjVU+a2Kxv1G8yX/LXHXtpSbxIVvgTqtAuGYT0hGkCFtUQaviJG z/r3DnGiFu+l8FPxw+CQEgeeyNG49TzyA7aODswWm3o6aWElptJDdQ8CgYEAw/7p RQkgLaKzLNidCNDNq/4/8zmJoMe6GVLGl+HVHKzn6pPZfctI201yaJ5LbyPaYD/2 2MlDleg4A9zZILykS3QRo/ex3H+7exYA4qQcLqXJT8D5oMlNvFiF6NWHu7WJtXlt q05vcBXdRy6s3by1+SXyH42H6H930AIER1366YUCgYAxfLlPniqjzzCBgTIpwvyH lxyhO7blBArWhjDpgPWsUcCDA8DSEx7/0wSRAIVG32/VYvEc7asVHzNLrrxizUlY A75+SPMBIsllvODyrZF1epdyXodehX+8ush6T+Dp+G6TYPywu4F2iec+z9IFyLib NiUPQQUI53LBrx74+ZqG1wKBgBhFlTXLb4S3RWEkYi4ZTZ8jGWBRm82hblZ8fcOJ YA7xCrduH90IM7mU2bpDACx/UCfjQ/qM0iXaYDV6QBlhwybk9NpNbmVUHC+eBfYL RMIyHcAWsdNLmqjcfZjb+LcyQB+NLhus1vgWfRS3nwjGufJk1Js7t7z/LCNCXK1J 4izRAoGBANSNXXYF32hQ8CJt/LqbtQaRcffdwoytFVps1lIlSfmu+huxZ5/yLuZt AWy9Ob5SiAXeEbPTqYA24qn8ACYL/Ar2CskY22HRJz/poQ1FuMRjf+/qsRP0VF2a pS4yn7u/iKCSIRheFY8w/u8gzxx/rSks/xEmoBCgOq8nguQkqa1h -----END RSA PRIVATE KEY----- ``` public\_key.pem ``` -----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnDI+Q/tbVToQ30DBB0y6 89ivB01gRhuAEYCqMeezhE8CrzQN3WGsox3Q3ortLZkbuFrMQdBN6ZjD1w0k9utx Lr3MFRbXqAxeXd7NlCz9biBaQw1LboKr10kVyENPTRT2NrQnfsFsI6WfvMKiu62/ ZEHT80DMUvilSSuRbNKrfwMqhKiRbM83Olxepk8XBNyRimvypxaPhcEiQYFlirVq /jvyUaJg01VjXxp1PKqXwIurF+Eu+W6b4OotLHY0EAPckNiP4XOHMNWd/NG5jV3F mEzz5Cn9IdMDHSewcA6/rsOqVx0bZOBnSsmVLu9fPsCyrs7eBSXZSlIFKHD39HR6 eQIDAQAB -----END PUBLIC KEY----- ``` `$crypted` returns to me encrypted data however decryption echos nothing. I did an echo of the result and it comes back as `NULL` any ideas?
ArmelR/stack-exchange-instruction
{ "qid": 15182572 }
stackexchange
109stackexchange_5
en
how long does it take for a pending transaction to go through navy federal?
sentence-transformers/gooaq
{ "index": 2421076 }
gooaq
47gooaq_2
en
Is there a way to get wrapText working for columns in a table? I'm trying the following and it's not registering in excel. ``` const columnsStyle = { font: { name: 'Arial Black', size: 12 } }; const columns = [ { name: 'PO#', style: columnsStyle, alignment: { wrapText:true } } ]; ws.addTable({ name: 'name', ref: `A${lastRowNum}`, columns: columns, rows: rows, }); ``` I've also tried putting 'alignment' in the 'style' object but it results in an error when opening in excel. (Table looks different and has no wrap text and excel says there's an error in trying to create it) `const columnsStyle = { font: { name: 'Arial Black', size: 12 }, alignment: { wrapText:true } }; const columns = [ { name: 'PO#', style: columnsStyle, } ];` **I also want to get all cells in these columns of the table wrapped too.** Does anybody have any idea on how to do this? I looked through the documentation several times and couldn't find anything concrete. Note: I know I can do `ws.getCell(ref).alignment = {wrapText:true}` and so I tried looking at the table object to see if I could **get a reference of all the cells in it, loop through them, and set the alignment**. But I was not able to get cells in the table.
ArmelR/stack-exchange-instruction
{ "qid": 59201494 }
stackexchange
109stackexchange_5
en
Data visualization tools for elixir Are there any tools for data visualizations, like D3 for JavaScript? I'm looking to make graphs from a program I am working on.
nreimers/reddit_question_best_answers
{ "index": 30257282 }
reddit_qa
96reddit_qa_3
en
I seem to be getting a lot of deadlocks when doing `select count(*)` on a particular table. I have already changed all the required parameters and made them into row only locking. I've also changed the database to use `READ_COMMITTED_SNAPSHOT` isolation, However, it seems that using a `select count(*) where column = ?` on the table causes deadlocks or locks on the table. Am I correct that the `select count(*)` should only be accessing intermediate rows? It doesn't seem that way and I'm still encountering deadlocks. Proper indexing would probably help, The question is: Does SQL Server 2008 R2 place shared lock on a table during `select count(*)` even when `read_committed_snapshot` is set to on?
ArmelR/stack-exchange-instruction
{ "qid": 31302 }
stackexchange
108stackexchange_4
en
Was the character of Bryce inspired by Trump? I just finished rewatching season 4 and it had me thinking, was the character of Bryce infused with Trump traits on purpose? The similarities in the personalities is striking.
nreimers/reddit_question_best_answers
{ "index": 44183960 }
reddit_qa
96reddit_qa_3
en
Desktop tiered synth stands Hi guys, I’m looking for recommendations on a three tier desktop stand sturdy enough to hold a subsequent 37, grand mother and rev 2. Any ideas?
nreimers/reddit_question_best_answers
{ "index": 31358564 }
reddit_qa
96reddit_qa_3
en
what does it mean when you can't see a comment on facebook?
sentence-transformers/gooaq
{ "index": 2192716 }
gooaq
47gooaq_2
en
how often do you have to change your retainer?
sentence-transformers/gooaq
{ "index": 73702 }
gooaq
47gooaq_2
en
Ideas for the czech (t)chassis line I think I'm not the only one who noticed that the (t) chassis line is somewhat cut off and doesn't offer nearly as many tanks as it could. What would people feel about making it more varied, throwing in a number of czech designed (and prototyped and used) medium tanks like the vz 39, t21s or the later designed Turans. Would fit thematically within the line and would make it interesting by mixing in multiple vehicle types.
nreimers/reddit_question_best_answers
{ "index": 9700082 }
reddit_qa
97reddit_qa_4
en
what are the requirements for library management system?
sentence-transformers/gooaq
{ "index": 1741546 }
gooaq
47gooaq_2
en
is oster a good microwave brand?
sentence-transformers/gooaq
{ "index": 1111884 }
gooaq
46gooaq_1
en
Lebron James should be ignored Until he denounces China for it's horrible human rights abuses and police crackdowns on Hong Kong, he should be totally ignored when it comes to police brutality. When given the opportunity to stand up for the oppressed, he went with his pocket book even though he already has hundreds of millions of dollars and didn't want to give up merch sales in China. If he is calling for Americans to empathize with the struggle for the equal handling of Black Americans by police officers, he should be held accountable for his complicit behavior in much worse rights abuses in Hong Kong.
nreimers/reddit_question_best_answers
{ "index": 42338748 }
reddit_qa
97reddit_qa_4
en
Dears, I'm looking into a efficient method to manage different animationsfor a character. This animations will be: talking, thinking, idle, move right/left arm, and others. Any idea to manage this? And maybe having more than one animation at the same time?
ArmelR/stack-exchange-instruction
{ "qid": 68726818 }
stackexchange
107stackexchange_3
en
how long do antibiotics take to clear chlamydia?
sentence-transformers/gooaq
{ "index": 1617407 }
gooaq
47gooaq_2
en
I was solving a question my teacher gave me and hit a little snag. I am supposed to give the output of the following code:(It's written in Turbo C++) ``` #include<iostream.h> void main() { char *p = "School"; char c; c=++(*(p++)); cout<<c<<","<<p<<endl; cout<<p<<","<<++(*(p--))<<","<<++(*(p++))<<endl; } ``` The output the program gives is: ``` T,chool ijool,j,i ``` I got the part where the pointer *itself* increments and then increments the *value which the pointer points to*. But i don't get the part where the string prints out **ijool** Can someone help me out?
ArmelR/stack-exchange-instruction
{ "qid": 15416416 }
stackexchange
108stackexchange_4
en
I'm using ng-file-upload as documented ``` <input type="file" name="file" accept="image/*" ngf-max-size="5MB" ngf-select="uploadFile($file, form)" class="form-control"> ``` However, sometimes it takes very long time to open the file dialogue. Though it never fails, 30s waiting is beyond acceptable. Has anyone met this before, is there any way to fix this?
ArmelR/stack-exchange-instruction
{ "qid": 42856807 }
stackexchange
108stackexchange_4
en
I have a BigDecimal 262727.00 / 48 = 5473.479166666666667 ``` BigDecimal value = new BigDecimal("5473.479166666666667"); value = value.setScale(0, RoundingMode.HALF_EVEN); System.out.println(value.toString()); ``` I expect to get 5474 but I got 5473. Has someone idea, how to get the number 5474? Thank you
ArmelR/stack-exchange-instruction
{ "qid": 59820673 }
stackexchange
107stackexchange_3
en
Who is plotting in the world scenario
lmsys/lmsys-chat-1m
{ "conversation_id": "f647cc0ac1f34030a63365c1475d6009" }
lmsys_chat
66lmsys_chat_1
en
what are the 3 branches of applied social science?
sentence-transformers/gooaq
{ "index": 1190254 }
gooaq
47gooaq_2