Recent Questions - Stack Overflow |
- Match Wildcard Pattern and Character String in R
- plugins not working after jquery ajax call,
- How can I get the data inside a beast::flat_buffer?
- Flutter SfCartesianChart Not Showing X . Y Axis
- Using py2app to create standalone application
- How can i make a iOS Phone Recorder app using xcode and swift
- How do I take input in a 2D char array using C
- How do I make a role in Discord.JS that is a bit higher than other roles on the Role Hierarchy?
- How to use arabert-v2 completely offline?
- Checking if User is Logged in via Express.js and Firestore
- How can I change the position of an <hr> element?
- NullReferenceException when raycasting in unity
- Random sample of points on a region of the surface of a unit sphere
- Private string becomes null when called from another method
- Prevent foreach loop from repeating -laravel
- Why is my app crashing while emulating on Android Studio (Kotlin Multiplatform) due to Null ImageView?
- vuepress2: how to get Vue instance so I can use third part vue plugin?
- creating objects and naming them at runtime in C++
- How to pass multiple id's/values in the gremlin query?
- How to read configuration value in minimal api in ASP.NET .NET 7
- Python multiprocessing pyaudio error (Ran out of input)
- Is there a way to change someDataGridViewCell.Style.BackColor (&etc) at any time?
- Python Tornado WebSocket: not working on second network interface
- Unable to find bundled Java version. MacBook Air M1
- Powershell number format
- Use existing session cookie in gin router
- dial tcp lookup: no such host issue on docker windows desktop
- How to convert datetime in jmeter using beanshell sampler
- Convert a JavaScript string in dot notation into an object reference
- Finding the index of an item in a list
Match Wildcard Pattern and Character String in R Posted: 22 Aug 2021 08:37 AM PDT I am trying to count how many times a keyword appears in a string. In the following variable text, I would like to count how many times keyword appears in text. The result should display 3 because AWAY appears twice and WIN appears once in the string. Any ideas? |
plugins not working after jquery ajax call, Posted: 22 Aug 2021 08:37 AM PDT I am using a scrollbar plugin, but the plugin is not working after the success ajx call. I am using this plugin https://github.com/gromo/jquery.scrollbar/ now what happens, this is ajax success call the |
How can I get the data inside a beast::flat_buffer? Posted: 22 Aug 2021 08:36 AM PDT I'm connecting to a websocket using the boost/beast libraries and writing the data into a I can write to the channel with |
Flutter SfCartesianChart Not Showing X . Y Axis Posted: 22 Aug 2021 08:36 AM PDT I am trying to show price and date in SfCartesianChart . It shows me blank chart here is my code , |
Using py2app to create standalone application Posted: 22 Aug 2021 08:36 AM PDT I'm trying to create a standalone app to facilitate editing of photos out of this project which provides a GUI as well. I'm following all the steps described in the project's Any help would be highly appreciated. I have worked with |
How can i make a iOS Phone Recorder app using xcode and swift Posted: 22 Aug 2021 08:35 AM PDT I wanna make an app to record phone call's but I'm still junior so any one can help me with article or code to make it . |
How do I take input in a 2D char array using C Posted: 22 Aug 2021 08:35 AM PDT |
How do I make a role in Discord.JS that is a bit higher than other roles on the Role Hierarchy? Posted: 22 Aug 2021 08:35 AM PDT Sort of a follow up to my other question but, I am making a slash command that'd make a role with customisable permissions, customisable colours, and a customisable place up in the Role Hierarchy. I've seen that it isn't possible to make a role that is higher up on the Role Hierarchy if the bot is lower than the role you want to put it above, unless done by a member with MANAGE_ROLES and a high role but, is it actually possible to make the bot do this or not? Any ideas? P.S: I have seen bots that, upon invited, request that you put their role at the top of the list. I might make something like that for my bot. |
How to use arabert-v2 completely offline? Posted: 22 Aug 2021 08:36 AM PDT I want to use the arabert-v2 preprocess offline. but it seems saving model is not enough for arabert preprocess function. What else should I download? any ideas? The git repository: https://github.com/aub-mind/arabert |
Checking if User is Logged in via Express.js and Firestore Posted: 22 Aug 2021 08:35 AM PDT I am trying to determine if a user is logged in via Express.js and Firestore. The idea is to have the login/create user form displayed on the url path, '/'. However, if the user is logged in, then the app will redirect the user to the user's dashboard page. This would happen when the user logs in or creates an account. When I run my code I get the error I've realized that the admin package doesn't have onAuthStateChanged as that is something that only exists for the client-side. However, I was wondering how I would implement loading a different view depending on if the user is logged in or not from the server side? Is it even good for me to do this via the server-side or is there a better way for me to approach this? |
How can I change the position of an <hr> element? Posted: 22 Aug 2021 08:37 AM PDT I just started in web dev and my first project is a resume website. I am trying to separate the education and experience sections with an hr element. It was working, then I used the float property in CSS to align education descriptions to the left and corresponding dates to the right. Now, the line that came after the education section is in the wrong area. Here is some code: The id e1 just floats left, and the id e2 floats right. How can I get the hr element to actually appear between the two sections, instead of in the middle of the education section? |
NullReferenceException when raycasting in unity Posted: 22 Aug 2021 08:35 AM PDT I am trying to use a raycast that writes the name of the object that hits and the position and when shooting the ray it gives a null reference exception. It happens at this line Ray ray = cam.ScreenPointToRay(Input.mousePosition); Here is the code. |
Random sample of points on a region of the surface of a unit sphere Posted: 22 Aug 2021 08:37 AM PDT I need to generate a random sample of points distributed on a region of the surface of a sphere. This answer gives an elegant recipe to sample the entire surface of the sphere: ( I need to restrict the sampling to a rectangular region. This region is defined by center values and lengths, for example:
where I could use the above function in the following way: call it using a large |
Private string becomes null when called from another method Posted: 22 Aug 2021 08:36 AM PDT I am making a 'Who Wants To Be A Millionaire' game. I am at the later stages, and I am trying to store the user names and scores, but when I call getUser() from another method it comes up as null, I printed the value of getUser() out to make sure it actually storing the values. Here is my code Here is the output |
Prevent foreach loop from repeating -laravel Posted: 22 Aug 2021 08:37 AM PDT I fetch services from our database through code How to ignore duplicate subcategories in the loop I get a lot of duplicate subcategories I need the details of the subcategory not just the name relations table services table subcategory |
Posted: 22 Aug 2021 08:35 AM PDT
The line this points to is where sleepButton is a button within a fragment that someone presses, to open another fragment within a frame layout. The app has a notification bar which cycles through 3 fragments: home, flight and settings. sleepButton's xml information is on the settings page, while the activity starts on home and this code is contained within MainActivity.kt Settings (Including sleepButton) In MainActivity, references to sleepButton are as follows: and the method makeCurrentFragmentS is |
vuepress2: how to get Vue instance so I can use third part vue plugin? Posted: 22 Aug 2021 08:37 AM PDT I am trying to use v-wave in VuePress 2 (the VuePress powered by Vue 3) I followed the docs, try to use the
But it didn't work, because the How can I install Thanks a lot! |
creating objects and naming them at runtime in C++ Posted: 22 Aug 2021 08:35 AM PDT Actually I'm making a budget calculating app, where there is a class for the items I buy. But I don't want to hard code every Item, I want to add items in the app and save it to file and calculate how much money I have left. |
How to pass multiple id's/values in the gremlin query? Posted: 22 Aug 2021 08:37 AM PDT How to pass multiple id's/values in the gremlin query? |
How to read configuration value in minimal api in ASP.NET .NET 7 Posted: 22 Aug 2021 08:35 AM PDT I have existing code which i am upgrading from .NET5 to .NET 6 currently I have it like How do I inject the Configuration dependency to be used in minimal ? |
Python multiprocessing pyaudio error (Ran out of input) Posted: 22 Aug 2021 08:36 AM PDT Code: from multiprocessing import Process, Queue, Pipe, freeze_support from PyQt5.QtCore import pyqtSignal, QThread import pyaudio from time import sleep class Papinhio_Player_Child_Proc(Process): def __init__(self,to_emitter,process_input_queue): super().__init__() self.to_emitter = to_emitter self.process_input_queue = process_input_queue #QoS settings bit_rate = 128*1024 #128 kb/sec packet_time = 744 packet_size = 4104 new_sample_rate = 44100 format = pyaudio.paInt16 channels = 2 p = pyaudio.PyAudio() #self.stream = p.open(format=pyaudio.paInt16,channels=channels,output=True,input=True,rate=new_sample_rate,frames_per_buffer=packet_size) #self.stream.start_stream() def run(self): pass ''' while(True): microphone_data = self.stream.read(8*int(4104))#744msec microphone_slice = AudioSegment(microphone_data, sample_width=2, frame_rate=44100, channels=1) microphone_slice = AudioSegment.from_mono_audiosegments(microphone_slice, microphone_slice) self.stream.write(microphone_slice.raw_data) self.to_emitter.send("Read microphone packet, and write to output.") ''' class Papinhio_Player_Emitter(QThread): a_signal = pyqtSignal(str) def __init__(self, from_process: Pipe): super().__init__() self.data_from_process = from_process def run(self): while True: try: data = self.data_from_process.recv() self.a_signal.emit(data) except EOFError as e: print(e) def a_signal_handler(self,string_data): print(string_data) if __name__ == '__main__': freeze_support() #papinhio_player_child_process = Papinhio_Player_Child_Proc() #papinhio_player_child_process.start() papinhio_player_mother_pipe, papinhio_player_child_pipe = Pipe() papinhio_player_queue = Queue() papinhio_player_emitter = Papinhio_Player_Emitter(papinhio_player_mother_pipe) papinhio_player_emitter.start() papinhio_player_emitter.a_signal.connect(a_signal_handler) #papinhio_player_queue.put(stream) papinhio_player_child_process = Papinhio_Player_Child_Proc(papinhio_player_child_pipe, papinhio_player_queue) papinhio_player_child_process.start() while(True): sleep(1) Problem with the up code: None When the problem is occured? If you uncomment this two lines: #self.stream = p.open(format=pyaudio.paInt16,channels=channels,output=True,input=True,rate=new_sample_rate,frames_per_buffer=packet_size) #self.stream.start_stream() What problem happens? Traceback (most recent call last): File "pyaudio_2.py", line 71, in papinhio_player_child_process.start() File "C:/msys64/mingw64/lib/python3.8/multiprocessing/process.py", line 121, i n start self._popen = self._Popen(self) File "C:/msys64/mingw64/lib/python3.8/multiprocessing/context.py", line 224, i n _Popen return _default_context.get_context().Process._Popen(process_obj) File "C:/msys64/mingw64/lib/python3.8/multiprocessing/context.py", line 327, i n _Popen return Popen(process_obj) File "C:/msys64/mingw64/lib/python3.8/multiprocessing/popen_spawn_win32.py", l ine 93, in __init__ reduction.dump(process_obj, to_child) File "C:/msys64/mingw64/lib/python3.8/multiprocessing/reduction.py", line 60, in dump ForkingPickler(file, protocol).dump(obj) TypeError: cannot pickle '_portaudio.Stream' object Traceback (most recent call last): File "", line 1, in File "C:/msys64/mingw64/lib/python3.8/multiprocessing/spawn.py", line 116, in spawn_main exitcode = _main(fd, parent_sentinel) File "C:/msys64/mingw64/lib/python3.8/multiprocessing/spawn.py", line 126, in _main self = reduction.pickle.load(from_parent) EOFError: Ran out of input Question: How can i use a pyaudio stream inside a Process? Thanks in advance, Chris Pappas |
Is there a way to change someDataGridViewCell.Style.BackColor (&etc) at any time? Posted: 22 Aug 2021 08:35 AM PDT Documentation says it must be done inside someDataGridView.CellFormatting event, but how can you pass the needed color information into it and force CellFormatting to be triggered when needed ? someDataGridViewCell.Value is working fine for changing cell text from a System.Windows.Forms.Timer Tick event, but I can't seem to change the coloring at the same time. In my case, all the columns are built and changed dynamically from user menus, and there can be dozens of them. This is VS2015. Update: My issue was I used Color.FromName() which returns Empty (transparent) for misspelled names -- very very bad for grid background colors. (I required coloring in data streams I was using so name seemed handy.) CellFormatting event used in most examples assumes you can derive the color information from the visible cell contents which is too limiting. |
Python Tornado WebSocket: not working on second network interface Posted: 22 Aug 2021 08:35 AM PDT I have WebSocket server and client app running on the same physical server. The server has two network interfaces and two IP addresses. When I run WebSocket server/client on first IP it works perfect. Bit it dosn't work on second. Server: With second IP I got the following errors on client: It seems like socket is closed and client cannot write message. |
Unable to find bundled Java version. MacBook Air M1 Posted: 22 Aug 2021 08:37 AM PDT I was using flutter on MacBook Pro with intel. It was working fine. Now I switch to MacBook Air with M1 chip. I get error Unable to find bundled Java version. How can I fix it pleas? flutter doctor -v [✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0) • Android SDK at /Users/mac/Library/Android/sdk • Platform android-31, build-tools 31.0.0 • Java binary at: /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java • Java version Java(TM) SE Runtime Environment (build 1.8.0_301-b09) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 12.5.1, Build version 12E507 • CocoaPods version 1.10.2 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [!] Android Studio (version 2020.3) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart ✗ Unable to find bundled Java version. • Try updating or re-installing Android Studio. [✓] Connected device (2 available) • macOS (desktop) • macos • darwin-arm64 • macOS 11.2 20D64 darwin-arm • Chrome (web) • chrome • web-javascript • Google Chrome 92.0.4515.131 ! Doctor found issues in 1 category. |
Posted: 22 Aug 2021 08:35 AM PDT I am creating a script converting a csv file in an another format. To do so, i need my numbers to have a fixed format to respect column size : 00000000000000000,00 (20 characters, 2 digits after comma) I have tried to format the number with Here is an example Input : Any hints are welcome :) Thank you ! |
Use existing session cookie in gin router Posted: 22 Aug 2021 08:35 AM PDT I'm building a simple webserver in Go / Gin and I want to use cookies to create a persistent session that keeps a user logged in if they navigate away or navigate across several pages. Ideally, this is the flow:
Code later on will verify if the cookie token value is expired and/or corresponds to an active user in the database. The most recent iteration I've tried is: But this fails because token_value is type func(c *gin.Context) string, and not string. I know there's something I'm missing here, and I'd love some guidance in how to resolve this issue. Thanks! |
dial tcp lookup: no such host issue on docker windows desktop Posted: 22 Aug 2021 08:35 AM PDT I've installed docker on my office windows 10 Pro machine. I'm facing dial tcp lookup issue while trying to pull from the registry. Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 192.168.65.1:53: no such host I've tried many possible solutions from online. But I couldn't figure out the issue. Can someone please help me regarding this issue. Thanks. |
How to convert datetime in jmeter using beanshell sampler Posted: 22 Aug 2021 08:35 AM PDT I have timestamp for one of my http sampler in following format and i need to convert it to in following format i tried different approaches but don't know what am i doing wrong.Can anyone help me on that.Thanks. |
Convert a JavaScript string in dot notation into an object reference Posted: 22 Aug 2021 08:37 AM PDT Given a JavaScript object, and a string how can I convert the string to dot notation so I can go If the string was just |
Finding the index of an item in a list Posted: 22 Aug 2021 08:35 AM PDT Given a list |
You are subscribed to email updates from Recent Questions - Stack Overflow. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google, 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
No comments:
Post a Comment