id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_23537700 | i want to know if there is something wrong with the code and why when i open it as an EXE it takes so long to open.
resetting the password for some of ZkTeck fingerprint machine
from tkinter import *
root = Tk()
root.title('ZkTeco Password Reset')
root.config(bg='orange')
def zkteco():
try:
time = int(a.g... | |
doc_23537701 |
A: Try to use Fiddler. It has great functionality for capturing all kind of web requests. Also it has the ability to search within a response document
A: If you only need to expose the requests that your browser chrome is managing, you can use a very powerful tool build in Chrome, you can access it from here:
chrome:... | |
doc_23537702 | Thanks
A: You could have one of a few problems, Clicking on the link in android webview does not get highlighted visually says you have to set Javascript as enabled with:
webView.getSettings().setJavascriptEnabled(true);
There's also been an issue with focus at Android:Webview with link highlight, where you should re... | |
doc_23537703 | /posts/notorious-b-i-g-is-the-best
which is suboptimal since Google construes the query "Notorious B.I.G." as "Notorious BIG" instead of "Notorious B I G" (i.e., the dots are removed rather than treated as spaces)
Likewise, "Tom's fave pizza" is converted to "tom-s-fave-pizza", when it should be "toms-fave-pizza" (sin... | |
doc_23537704 | I tried to print the Height of the picture. Iam getting
"Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object."
Pfb the Program.cs file:
class Program
{
private static GraphServiceClient _graphClient;
static void Main(string[] args)
{
var config =... | |
doc_23537705 | I have tried pytesseract but the resultant text is not accurate. I found alphabets in the text rather than latitude and longitude.
I need to get data in the form: Title of the image, Latitude, Longitude
[![Lat_Image][2]][2]
path = 'C:/BackUp/PhD/Data_from_Core_AP/Python/GeoTaggingWellsImages/filtered_images/Chittoor/'+... | |
doc_23537706 | I have a call back interface for logging declared as follows
public interface ILoggerCallback
{
void critical(ref string message);
void debug(ref string message);
void error(ref string message);
void infohigh(ref string message);
void infolow(ref string message);
... | |
doc_23537707 | This is my service class
public class MyService extends Service{
Sensor proxSensor;
SensorManager sm;
public static MyService instance;
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
instance = this;
return Service.START_STICKY;
}
public void startScan(){
sm=(SensorManager)g... | |
doc_23537708 | How do I change it to 24 hours clock? I've found that I need to change alwaysUse24HourFormat property in Window class but i have no idea how to do it.
Could anyone help me?
Thank you in advance for your answers.
edit:
code is shown below:
Future<Null> _selectTime(BuildContext context) async {
final TimeOfDay re... | |
doc_23537709 | BR
Kivu
A: Nothing will happen to data in KeyChain, keychain persists even after the app is removed, it is linked to AppID and the access rights depend on the provisioning profile used when signing your application.
On iPhone, Keychain rights depend on the provisioning profile used to
sign your application. Be sure... | |
doc_23537710 | const jwt = require("jsonwebtoken");
const sa = require("./credentials-ads.json");
const authUrl = "https://www.googleapis.com/oauth2/v4/token";
const scope = "https://www.googleapis.com/auth/adwords";
const getSignedJwt = () => {
const token = {
iss: sa.client_email,
iat: parseInt(Date.now() / 1000),
e... | |
doc_23537711 | I want to add version v1.1 in between.
How can i do it using cmd's with out manually dropping v2 and running flyway migrate once again?
A: Run with outOfOrder turned on; see the migrate docs.
Option: outOfOrder
Required: No
Default: false
Description: Allows migrations to be run "out of order".
If you already have v... | |
doc_23537712 | 2019-09-09 17:19:01.083 32714-32738/? I/Unity: AdMob Init() called.
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 48)
2019-09-09 17:19:01.231 32714-32738/? I/Ads: Updating ad debug logging enablement.
2019-09-09 17:19:01.245 32714-449/? W/Ads: Update ad debug logging enablement as false
2019-09-09 17:19... | |
doc_23537713 | cmd = [ 'dir.exe', u'по-русски' ]
p = subprocess.Popen([ 'dir.exe', u'по-русски' ])
Error log:
Traceback (most recent call last):
File "process.py", line 48, in <module>
cyrillic()
File "process.py", line 45, in cyrillic
p = subprocess.Popen(cmd, shell=True, stdin=None, stdout=None, stderr=subprocess.PIPE)... | |
doc_23537714 | Here is the HTML:
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
</ul>
I have to clone to
<ul>
</ul>
without repeat a li and until to complete 3 elements
Here is my jquery code
var total = $(this).find('.contentSecond ul li').length;
$('first.content ul li').click(function() {
for (var i =... | |
doc_23537715 | I didn't create the agent pool, but the server administrator has added me as an administrator of the pool - which according to the documentation is the only permission needed to register an agent.
However, when I attempt to register the agent using the command-line tool, I get the following error:
Connecting to the se... | |
doc_23537716 | The information in the database looks like this:
x(1),0.1,0.7,0.2
z(0.5),0.2,0.3,0.5
etc...
I want to draw a grid of boxes. The fill in the boxes will be based on the information from the MySQL database.
I understand that I can use PHP to retrieve the information. But how do I go from retrieving the info to drawing a... | |
doc_23537717 | i have followed the steps for installing open cv and the other dependencies but when i try to run it i get the following error
(cv) pi@raspberrypi:~/Smart-Security-Camera $ python main.py
Traceback (most recent call last):
File "main.py", line 3, in <module>
from mail import sendEmail
File "/home/pi/Smart-Secu... | |
doc_23537718 | it's throwing "System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target mac... | |
doc_23537719 | My code:
public class SearchUser extends AppCompatActivity{
private static final String TAG = "SearchUser";
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Button b = (Button) findViewById(R.id.btnSearchUser... | |
doc_23537720 | For example, consider the following list of weighted edges containing 4 nodes and 3 edges:
A B 1
A C 2
C D 3
Then the output adjacency matrix is the following:
0 1 2 0
1 0 0 0
2 0 0 3
0 0 3 0
I am looking to do this in a memory-efficient way—100000 by 100000 adjacency matrix (10**10 values). Note that the matrix is s... | |
doc_23537721 | My working code:
$.getJSON(url, function(json)) {
if(typeof json === 'object' && json.length > 0) {
var nameData = [json[0]['name'],json[1]['name'],json[2]['name'],json[3]['name'],json[4]['name'],json[5]['name']];
var matchedData = [json[0]['data']['Matched'],json[1]['data']['Matched'],json[2]['dat... | |
doc_23537722 | <script type="text/javascript">
$.ajaxSetup({cache: false});
$(document).ready(function() {
// set up the click event
$('a.groups_loader').on('click', function() {
var toLoad = '<? echo base_url(); ?>user/account_groups/';
$('.groupsajax').fadeOut(100, loadContent);
... | |
doc_23537723 | But the send function is not picking any error after connection has been broken for more than 20s. Ideally with keepalive enabled, after 20s (keepalive_interval + keepalive_probes*keepalive_time) E_TIMEDOUT should be added to socket pending errors.
As this answer says,
"Both read(2) and write(2) first retrieve any pe... | |
doc_23537724 | For example, the pure Java edition timetabling system can get a 0Hard/-352Soft score. But the web edition can only get -7Hard/-1108Soft. No matter how long we run the example.
The web edition is hosted in a WildFly 9. The JVM versions we use are both Oracle JVM 1.8; Further, we tried using WildFly 10. And the result is... | |
doc_23537725 | Before flagging as duplicate: I tried to apply answers in Keep ListView.HeaderTemplate visible/static/sticky in UWP for Xamarin.Forms targeting Android without success.
Short code sample:
<ListView ItemsSource="{Binding MyList}"
HasUnevenRows="True"
SeparatorVisibility="Default"
... | |
doc_23537726 | (example)
I've found only star rating systems and one slider that is not similar to the one that I'm looking for. (jquery ui slider)
Anyone knows something like that I'm looking for? Otherwise I'm willing to pay someone for this work.
A: It's not hard to roll your own, you just need a combination of jQuery/AJAX, CSS a... | |
doc_23537727 | ERROR: type should be string, got "https://codepen.io/manu506/project/editor/DQyMvM\n/*************************************************************/\n/* BASIC SETUP */\n/************************************************************/\n\n* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\nhtml {\n background-color: #ffffff;\n color: #000000;\n font-family: 'Lato', 'Arial', sans-serif;\n font-weight: 300;\n font-size: 18px;\n text-rendering: optimizeLegibility; \n}\n\n\n\n/*************************************************************/\n/* REUSABLE COMPONENTS */\n/************************************************************/\n\n.row {\n width: 1140px;\n margin: 0 auto;\n}\n\nh1 {\n font-family: 'Merrriweather', serif;\n font-weight: 900;\n font-size: 500%;\n}\n\nh2 {\n font-family: 'Merrriweather', serif;\n font-weight: 400;\n font-size: 200%;\n}\n\nh3 {\n font-family: 'lato', 'arial', sans-serif;\n font-weight: 900;\n font-style: italic;\n}\n\np {\n font-family: 'lato', 'arial', sans-serif;\n font-weight: 400;\n font-size: 130%;\n}\n\n.btn {\n display:inline-block;\n padding: 10px 30px;\n font-weight: 300;\n text-decoration: none;\n border: 1px solid #0f0f0f;\n color: #0f0f0f;\n transition: background-color 0.3s, color 0.3s;\n}\n\n.btn:hover, .btn:active {\n background-color: #0f0f0f;\n color: #ffffff;\n}\n\n.btn:visited {\n background-color: #0f0f0f;\n}\n\n\n/*************************************************************/\n/* Navigation */\n/************************************************************/\n\n\n/* Header Background */\n\nheader {\n background-image:linear-gradient(#000000dc, #000000dc), url(https://image.ibb.co/irJBJz/header.jpg);\n background-size: cover;\n background-position: center;\n height: 100vh;\n background-attachment: fixed;\n}\n\n/* Logo */\n\n.logo {\n font-family: 'Merrriweather', serif;\n font-weight: 400;\n font-size: 250%;\n color: #fff;\n display: inline-block;\n position: absolute;\n left: 2%;\n}\n\n/* Navigation Menu */\n\n.nav-menu {\n float: right;\n list-style: none;\n position: absolute;\n right: 2%;\n top: 0%;\n}\n\n.nav-menu li {\n display: inline-block;\n margin: 30px;\n\n}\n\n.nav-menu li a:link,\n.nav-menu li a:visited {\n color: #fff;\n text-decoration: none;\n padding: 4px;\n border-bottom: 2px solid transparent;\n transition: border-bottom 0.5s;\n}\n\n.nav-menu li a:hover,\n.nav-menu li a:active {\n border-bottom: 2px solid #fff;\n}\n\n/* Header Mid Text Box */\n\n.text-box {\n position: absolute;\n width: 100%;\n color:#fff;\n text-align: center;\n top: 25%;\n}\n\n/******** Section 1 *************/\n\n.section1 {\n margin-top: 8%;\n}\n\n.section1-text {\n margin-top: 25%;\n\n}\n\n.section1-text h2 {\n font-size: 350%;\n}\n\n.section1-text h3 {\n font-size: 145%;\n margin-top: 10px;\n}\n\n.section1-text h3::before {\n display: block;\n height: 2px;\n background-color: #e67e22;\n content: \"\";\n width: 90px;\n margin-top: 5px;\n margin-bottom: 5px;\n}\n\n\n.section1-text p {\n color: #555;\n padding-top: 15px;\n padding-bottom: 35px;\n}\n\n\n/* *********** Section 2 ************ */\n\n.section2 {\n margin-top: 10%;\n width: 100%;\n}\n\n.section2-text {\n width: 33.33%;\n margin-top: 10%;\n}\n\n.section2-text h2 {\n font-size: 350%;\n}\n\n.section2-text h3 {\n font-size: 145%;\n margin-top: 10px;\n}\n\n.section2-text h3::before {\n display: block;\n height: 2px;\n background-color: #e67e22;\n content: \"\";\n width: 90px;\n margin-top: 5px;\n margin-bottom: 5px;\n}\n\n.section2-text p {\n color: #555;\n padding-top: 15px;\n padding-bottom: 35px;\n}\n\n/******** Section 3 *************/\n\n.section3-text {\n display: block;\n margin-top: 18%;\n}\n\n.section3-text h2 {\n font-size: 350%;\n}\n\n.section3-text h3 {\n font-size: 145%;\n margin-top: 10px;\n}\n\n.section3-text h3::before {\n display: block;\n height: 2px;\n background-color: #e67e22;\n content: \"\";\n width: 105px;\n margin-top: 5px;\n margin-bottom: 5px;\n}\n\n.section3-text p {\n color: #555;\n padding-top: 15px;\n padding-bottom: 35px;\n}\n\n\n/******** Section 4 *************/\n\n.section4 {\n margin-top: 8%;\n}\n\n.section4-text {\n margin-top: 18%;\n}\n\n.section4-text h2 {\n font-size: 350%;\n}\n\n.section4-text h3 {\n font-size: 145%;\n margin-top: 10px;\n}\n\n.section4-text h3::before {\n display: block;\n height: 2px;\n background-color: #e67e22;\n content: \"\";\n width: 100px;\n margin-top: 5px;\n margin-bottom: 5px;\n}\n\n.section4-text p {\n color: #555;\n padding-top: 15px;\n padding-bottom: 35px;\n}\n\n\n/******** Section 5 *************/\n\n.section5 {\n width: 100%;\n margin-top: 8%;\n}\n\n.section5-img {\n padding-left: 10%;\n}\n\n.section5-text {\n width: 33.33%;\n margin-top: 14%;\n}\n\n.section5-text h2 {\n font-size: 350%;\n}\n\n.section5-text h3 {\n font-size: 145%;\n margin-top: 10px;\n}\n\n.section5-text h3::before {\n display: block;\n height: 2px;\n background-color: #e67e22;\n content: \"\";\n width: 187px;\n margin-top: 5px;\n margin-bottom: 5px;\n}\n\n.section5-text p {\n color: #555;\n padding-top: 15px;\n padding-bottom: 35px;\n}\n\n/******** Section 6 *************/\n\n.section6 {\n margin-top: 11%;\n text-align: center;\n}\n\n.section6 span {\n display: block;\n font-size: 70%;\n}\n\n.section6 h3 {\n margin: 2%;\n font-size: 200%;\n}\n\n.section6 p {\n display: block;\n padding-top: 25px;\n padding-bottom: 25px;\n}\n\n\n/******** Section 7 *************/\n.section7 {\n margin-top: 8%;\n margin-bottom: 8%;\n width: 100%;\n background-color: #161616;\n text-align: center;\n}\n\n.section7-services {\n margin: 0;\n}\n\n.blur-image1 {\n width: 100%;\n height: 700px;\n background-image: url(\"https://image.ibb.co/m9q2Qe/services.jpg\");\n background-repeat: no-repeat;\n background-size: cover;\n opacity: 0;\n transition: opacity 0.5s;\n}\n\n.blur-image1:hover {\n opacity: 1;\n}\n\n.service-text-box {\n display: inline-block;\n width:35%;\n padding-top: 35px;\n padding-bottom: 35px;\n text-align: center;\n border: 2px solid white;\n background-color: #fff;\n transform: translate(0, -450px);\n}\n\n.section7-work {\n margin: 0;\n}\n\n.blur-image2 {\n width: 100%;\n height: 700px;\n background-image: url(\"https://image.ibb.co/muF2Qe/work.jpg\");\n background-repeat: no-repeat;\n background-size: cover;\n opacity: 0;\n transition: opacity 0.5s;\n}\n\n.blur-image2:hover {\n opacity: 1;\n}\n\n.work-text-box {\n display: inline-block;\n width:35%;\n padding-top: 35px;\n padding-bottom: 35px;\n text-align: center;\n border: 2px solid white;\n background-color: #fff;\n transform: translate(0, -450px);\n}\n\nI used https://www.dtelepathy.com/ as an inspiration for the design. But I am not able to achieve the same result. If you look at css and html, from section 1 to section 7, all images are going out of browser boundary. If I use overflow:hidden property, then my images are being cropped out, which I don't want. Can you please help me out?\nI am using this grid system: http://www.responsivegridsystem.com/\n\nA: Add these properties to img tag\nimg {\n width: 100%;\n height: auto;\n font-size: 0;\n}\n\nIf the width property is set to 100%, the image will be responsive and scale up and down:\n\nA: Use this code:\nThis CSS Style is used to be make width of the scroll bar \"0\"\nSo we can hide the scrollbar without overflow hidden.\n::-webkit-scrollbar { width: 0px;}\n\n" | |
doc_23537728 | Below is the Main pages initialize function:
public void initialize() {
try {
Class.forName("org.apache.derby.jdbc.ClientDriver").newInstance();
//below gets the connection specified earlier
conn = DriverManager.getConnection(dbURL);
System.out.println("DB Connec... | |
doc_23537729 | How can I do this?
A: "Service access rules list" page has a rule that only "ADMIN" roles have permission for WFS-Transaction.
wfs.Transation --> ADMIN
You must delete this rule.
| |
doc_23537730 | How can i add my script for check if a pseudo already exist in my function SignUp ?
_signUp(String _email, String _password, String _pseudo) async {
try {
//Create Get Firebase Auth User
if (_formKey.currentState.validate()) {
await auth.createUserWithEmailAndPassword(
email: _emai... | |
doc_23537731 | Currently what I am doing is storing the paths of all the files of each directory in an array:
Find.find(dir1) do |path|
if File.file?(path)
directory1_files << path # Add path to an array of file_paths for the 1st directory.
end
end # I repeat the process for the second directory and store their paths in an ar... | |
doc_23537732 | struct node
{
int label;
long cost=LONG_MAX;
bool visited=false;
bool operator < (const node &other) const { return cost < other.cost; }
}
set<node> S;
//here i just want to update the cost of a node in my set S
set<node>::iterator it=S.find(vertex);
*it.cost=200;
Does that change the order i... | |
doc_23537733 | //Cards.php
public function __construct(array $attributes = []) {
$this->gateway = StripeGateway;
}
protected $fillable = ['user_id', 'card_id', 'customer_id', 'exp_year', 'exp_month', 'funding', 'brand', 'last4'];
public function createNewCardFromCustomer($user_id, $customer)
{
$result = $this->c... | |
doc_23537734 | For example if i connect to it with the private ip the "nat" respond correctly and all is ok.But if i try to connect to this server through a public ip he respond with:you can't connect to this ftp server through a different ip of the ftp.
with filezilla all is ok.(the connection is active and explicit with ssl.
my cod... | |
doc_23537735 | public class GPS_module implements LocationListener {
private Context context;
public GPS_module(Context ctx) {
context = ctx;
manager = (LocationManager) context
.getSystemService(Context.LOCATION_SERVICE);
}
.....
public void sendMessage(String str) {
Intent intent = n... | |
doc_23537736 | On my computer the macro run just fine and did what I needed, but on this someone's computer it showed that error that I never saw as a VBA developer of “Can't find Project or Library” on the first line of the sub I wanted to excute.
Does anyone have any suggestions or suggestions?
A: just use this pattern:
Sub Test()... | |
doc_23537737 | How can I debug Eclipse to see if something is running in background? Does Eclipse have any console or log so I can see what exactly is being done?
Not to mention, I even restarted the Eclipse but it just works for a few moment and then again reaches high CPU usage. What could be the problem?
*
*Windows 7 64bit
*E... | |
doc_23537738 |
A: Unfortunately, Google Maps Platform terms of service prohibit using an API for real-time navigation.
Have a look at paragraph 3.2.4 Restrictions Against Misusing the Services. It reads:
(d) No Re-Creating Google Products or Features. Customer will not use the Services to create a product or service with features t... | |
doc_23537739 | I have a main application and a library module, and I'm using the Facebook SDK in the library module. Here's my top project gradle:
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.0.0'
// NOTE: Do not place ... | |
doc_23537740 | 2018-12-11 15:26:04.877
Into a datetime, where there are no microseconds and all seconds are zero:
2018-12-11 15:26:00
What I have done so far is:
import pandas as pd
import datetime
dfdf=pd.read_excel('datefix.xlsx')
print(df.dtypes)
df.date =pd.to_datetime(df.date, errors='coerce')
print(df.date)
df["date"].datetim... | |
doc_23537741 | date_of_birth = models.DateField()
class PetSerializer(serializers.ModelSerializer):
class Meta:
model = Pet
fields = "__all__"
Now when i trying to do
curl -X POST -H "Content-Type: application/json" \
-d '{
"date_of_birth":"2021-08-29T00:46:27.103Z"
}' http://localhost:8025/api/dob/
I get
... | |
doc_23537742 | a:8:{s:3:"key";s:19:"field_501743d4baa78";s:5:"label";s:8:"Category";s:4:"name";s:8:"category";s:4:"type";s:8:"checkbox";s:12:"instructions";s:0:"";s:8:"required";s:1:"1";s:7:"choices";a:17:{s:4:"Arts";s:4:"Arts";s:8:"Business";s:8:"Business";s:14:"Communications";s:14:"Communications";s:16:"Criminal Justice";s:16:"Cri... | |
doc_23537743 | notifyThread . Both the methods will hold a same lock obj. waitThread in the while loop of synchronized block will call wait method ,the lock of thread1 is released and other thread say thread2 need to go for notifyThread method and set the flag value to true. But the output iam getting is
Both the thread1 and thread... | |
doc_23537744 |
A: Press CTRL+SHIFT+R to refresh intellisense cache
| |
doc_23537745 | The states are; S1, S2, S3, BEGIN, END
The values are rounded and truncated.
The smoothed State transition table is as follows;
S1 S2 S3 B E
S1 -0.7 -1.6 -1.6 -INF -2.0
S2 -2.0 -1.3 -0.7 -INF -2.0
S3 -1.3 -0.7 -2.0 -INF -2.0
B -1.2 -1.2 -1.2 -INF -1.9
E -INF -... | |
doc_23537746 | print 'Listening...'
while not shutdown:
while sys.stdin in select.select([sys.stdin], [], [], 0)[0]: #look for keyboard input... not working
line = sys.stdin.readline()
if line:
send_message(line)
else: # an empty line means stdin has been closed
print('eof')
exit(0)
... | |
doc_23537747 | import clr
clr.AddReferenceToFileAndPath("C:\\Microsoft\\Exchange\\Web Services\\2.1\\Microsoft.Exchange.WebServices.dll")
from Microsoft.Exchange.WebServices.Data import *
def main():
ex_service = ExchangeService(ExchangeVersion.Exchange2010)
ex_service.UseDefaultCredentials = True
ex_service.AutodiscoverUrl("me@com... | |
doc_23537748 | My client needs report with records count at bottom of his report.
Something like this:
Select * from My_table where id>5
union all
select ('Record Count: ' + count(*)) from My_table where id>5
| |
doc_23537749 | What's the correct way of reacting to keyboard input, e.g. the arrow keys, and change TilePos by one whenever a key is pressed once?
A: You probably want to look at the cookbook for more examples.
If there is only one player, then you should make it a resource so that you can just do: ResMut<TilePos> in the function d... | |
doc_23537750 | should urllib.urlopen() be followed by urllib.close()? Otherwise, one would leak connections, correct?
A: Strictly speaking, this is true. But in practice, once (if) urllib goes out of scope, the connection will be closed by the automatic garbage collector.
A: Like @Peter says, out-of-scope opened URLs will become el... | |
doc_23537751 | #guess image_name is the string
imgname = np.zeros(len(image_name))
for i in range(len(image_name)):
imgname[i] = ord(image_name[i])
and I load the encoded imgname in Lua with ffi.string as follow:
image_name = ffi.string(img_name:char():data()
but I got the error: fb15268637bc28e2175502f1a3bec6fb.jpg���7��R�, ... | |
doc_23537752 | public boolean contains(String it) {
int index=front;
while(index!=-1){
if(dataList[index].equals(it)) {
return true;
}
index= nextList[index];
}
return false;
}
how does the .equals() comparison method affect the algorithmic complexity? Does it turn it from linear t... | |
doc_23537753 |
I passed the state object as dependency because i want to re-render
the component when values of settings object changes.
But it causes an infinite loop.
Update:
Let me clear my question more.
In my useEffect, I am calling my async function addTextItem() which calls the function finalPrice and it updates the state, b... | |
doc_23537754 | select t1.TQ
from table1 t1
left join table2 t2 on t1.comp_cd = t2.comp_cd and t1.plcy_frm = t2.plcy_frm
and t1.val_cd = t2.val_cd
The columns "comp_cd" and "plcy_frm" are fine, however the problem is with val_cd. Sometimes the val_cd in table2 does not map correctly to table1 and must... | |
doc_23537755 | Let's say I have a league where players compete against each other in 2 teams of 2 with RANDOM partners. They will then play 3 games:
Ex:
Court 1 has players A, B, C, and D: ABvsCD then ACvsBD then BCvsAD.
If I have 20 people in this league, and the league will go 24 weeks. How can I make sure that number of times tha... | |
doc_23537756 | The parts that don't work are the click-through part, and the directx render. When I run it I basically have an invisible force field in front of all other windows and have to alt-tab around to visual studio to quickly press ALT F5 and end the debug (so at least the always on top and transparency works). I have been t... | |
doc_23537757 | wget http://nodejs.org/dist/node-v0.4.10.tar.gz
tar -zxvf node-v0.4.10.tar.gz
cd node-v0.x.x
./configure --prefix=~/node
make
make test
make install
this should set me up with a nodejs install under ~/node however, during the ./configure --prefix=~/node I encounter the this in the dependency requirement:
node-v0... | |
doc_23537758 | in ruby i notice a lot of people do this:
do_something(with params) if 1 = 1
is there any difference (even slight) between that and this:
if 1 = 1 do_something(with params)
or is it the same thing written for better clarity?
A: The latter is syntactically invalid. You would need to write:
if 1==1 then do_something(w... | |
doc_23537759 | if let domain = Bundle.main.bundleIdentifier {
UserDefaults.standard.removePersistentDomain(forName: domain)
}
With the code above, there are "random cases" where UserDefault was not cleared so I can only assume that the Bundle.main.bundleIdentifier is nil thus the statement were not executed. This is needed in ou... | |
doc_23537760 | The above question is in reference to when working with HTMLElementObjects as variables.
Google Chrome's extension development example shows this in the below function:
let current = event.target.parentElement.querySelector(
`.${selectedClassName}`
);
if (current && current !== event.target) {
current.cla... | |
doc_23537761 | <?php
$mageFilename = 'app/Mage.php';
require_once $mageFilename;
ini_set('display_errors', 1);
umask(0);
Mage::app('admin');
Mage::register('isSecureArea', 1);
$product = Mage::getModel('catalog/product');
$product->setSku("ABC123");
$product->setName("Name");
$product->setDescription("Desc.");
$product->setShortDe... | |
doc_23537762 | 1.My first task is to calculate average r,g,b color component of the test
region
(1251, 532, 589, 82)
for that i have written below pseudo code which give
me ouput as
(217, 15, 28)
import cv2
from PIL import Image
import math
import numpy as np
class CompareColor(object):
''' loop through each pixel and ave... | |
doc_23537763 | foreach ($giftCardSchemeData as $keypreload => $preload) {
for ($i=0; $i <$preload['quantity'] ; $i++) {
$cardid = new CarddetailsId($uuidGenerator->generate());
$cardnumber = self::getCardNumber();
$cardexistencetype = ($key == "giftCardSchemeData") ? "Physical" : "E-Card" ;
$giftCardScheme... | |
doc_23537764 | let
Source = Web.Page(Web.Contents(**"https://coinmarketcap.com/currencies/eos/historical-data/?start=20130428&end=20180309"**)),
Data0 = Source{0}[Data],
#"Changed Type" = Table.TransformColumnTypes(Data0,{{"Date", type date}, {"Open", type number}, {"High", type number}, {"Low", type number}, {"Close", ty... | |
doc_23537765 | Below is my current dockerfile:
FROM rocker/tidyverse:latest
RUN mkdir -p $HOME/.R
COPY R/Makevars /root/.R/Makevars
RUN apt-get update -qq \
&& apt-get -y --no-install-recommends install \
liblzma-dev \
libbz2-dev \
ed \
clang \
ccache \
default-jdk \
default-jre \
&& R CMD javare... | |
doc_23537766 | But 'git push' is not doing its job. It does all the local processing but gets stuck at the last step. How can I resolve this?
I did the following:
git checkout master
git merge --no-ff dev_08_15
git commit -a -m "dev_08_15 Merge commit"
git push origin master
And now git is stuck at this place. Below is the output I ... | |
doc_23537767 | As you can see there is a Tale Model and Purpose Model and a Has_many_through join model TalePurposeJoin
Now the join table has data as [4,3] but on query tale.purpose_ids I get [3,4]
I want to retain the db order.
What is activerecord doing behind the scene, why and how do I stop it.
Here is the query sql is generat... | |
doc_23537768 | When retrieving recordsets, the application uses the Bang (!) operators to access the fields in the recordsets Eg RS!OrderId.
Whilst I am aware of this practice, I have never actually used it(except when I have been lazy), Neither have I used RS("OrderId") as I have always (or usually) used the fully qualified method (... | |
doc_23537769 | my $vstup = "C:/Users/Omega/Documents/Kontroly/testkontroly/kontroly20220513_154743.txt";
my $log = "C:/Users/Omega/Documents/Kontroly/testkontroly/kontroly.log";
open( my $default_fh, "<", $vstup ) or die $!;
open( my $main_fh, ">", $log ) or die $!;
my $var = 0;
while ( <$default_fh> ) {
if (/\Volat\... | |
doc_23537770 | I have looked on here as well as my college textbook and cannot find a clear answer. The answers that I have seen use C functions to handle the output, I am trying to stay away from C because I really want to understand how Assembly works.
Anyways, the program below does 2 things. The first thing it does is loop x num... | |
doc_23537771 | export function useSort<PossibleType>(
delay: number,
array: PossibleType extends "MainPanel.tsx" ? Chat[] : PossibleType extends "NewGroup.tsx" ? NewGroupMember[] : [],
type: PossibleType
) {
const [rawInput, setRawInput] = useState("");
const [filteredData, setFilteredData] = useState<Chat[]>([])... | |
doc_23537772 | I have three views in my app, View1, View2, View3.
I know how to go from View1 to View2, and from View2 to View3, but how do I go from View3 back to View1?
I am using the following method in the View1ViewController.m to go from View1 to View2:
[self presentModalViewController:view2ViewController animated:YES]
And the ... | |
doc_23537773 | I am trying to add sound effects when a button is pressed.
#import <AudioToolbox/AudioToolbox.h>
- (void)threeBombExplosion
{
NSString *soundPath = [[NSBundle mainBundle] pathForResource:@"3Explosions" ofType:@"mp3"];
NSURL *threeExplosionsURL = [NSURL fileURLWithPath:soundPath];
AudioServicesCreateSystem... | |
doc_23537774 |
[![enter image description here][1]][1]
As you see, I want to storage my inputs' value from the form:
In my my-app.js:
// Initialize your app
var myApp = new Framework7();
// Export selectors engine
var $$ = Dom7;
// Add views
var view1 = myApp.addView('#view-1');
var view2 = myApp.addView('#view-2', {
// Becau... | |
doc_23537775 | I have installed google usb driver from sdk manager.
Now i am trying to connect my Samsung GT-I9300, I can see my device on computer list but eclipse dont open dialog to select device, it is still running application on Emulator virtual device.
I am using Windows 7 Professional with Service Pack 1
Please check screen s... | |
doc_23537776 | 11-30 21:46:00.822 13943-13943/com.example.user.timetable_test E/SQLiteLog: (1) near "TABLESunday": syntax error
11-30 21:46:00.827 13943-13943/com.example.user.timetable_test D/AndroidRuntime: Shutting down VM
11-30 21:46:00.827 13943-13943/com.example.user.timetable_test E/AndroidRuntime: FATAL EXCEPTION: main
... | |
doc_23537777 | There seems to be some debugging protection because main() is not in the bt stack, and I cannot access any of the functions, class-dump-z and IDA Pro both show the functions clearly.
The last two entries in the BT Stack are:
_mh_execute_header<br>
_mh_execute_header<br>
This is where main() should be.
Has anyone seen ... | |
doc_23537778 | I've been searching for an alternative, and I couldn't seem to find one.
So, how can I check the internet connection in Android Q?
A: Use this code snippet.
@IntRange(from = 0, to = 3)
public static int getConnectionType(Context context) {
int result = 0; // Returns connection type. 0: none; 1: mobile data; 2: wif... | |
doc_23537779 | However, I am having difficulties implementing the pattern on Android because of special requirements to the GUI of Android applications:
*
*An Activity may be destroyed at any point (incoming call, user presses home button, ...), and when recreated it should be in the exact same state as when it was left. This is un... | |
doc_23537780 | Obviously, you can use the :info command to find all the instances for a type constructor. But what about some complex type expression?
For example, if I wanted to know what instances Maybe Int has (not Maybe, but Maybe Int), how can I do that?
I tried
:info Maybe Int
but that just gives me information for Maybe, fol... | |
doc_23537781 | android-apt plugin is incompatible with the Android Gradle plugin. Please use 'annotationProcessor' configuration instead.
Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-de... | |
doc_23537782 | php file
<?php
$xmlDoc=new DOMDocument();
$xmlDoc->load("links.xml");
$x=$xmlDoc->getElementsByTagName('link');
//get the q parameter from URL
$q=$_GET["q"];
//lookup all links from the xml file if length of q>0
if (strlen($q)>0) {
$hint="";
for($i=0; $i<($x->length); $i++) {
$y=$x->item($i)->getElementsBy... | |
doc_23537783 | Windows Azure Tools: Error: The installed Windows Azure Emulator does not support the role binaries. Please install the latest Windows Azure Emulator and try again.
Windows Azure Tools: The system is missing a prerequisite to execute the service. Please see the release notes.
Is it possible to get 1.7 projects to run u... | |
doc_23537784 | Is there anyway to disable the double click functionality in the table cell??
Thanks in advance.
A: Technically, the answer is to configure the cellEditor to start editing on single click
DefaultCellEditor editor = (DefaultCellEditor) table.getDefaultEditor(Object.class);
editor.setClickCountToStart(1);
That doesn'... | |
doc_23537785 | <key>UIFileSharingEnabled</key>
<string>YES<string/>
It results in this error: "couldn't parse contents of '/Users/me/Desktop/MyApp/MyApp-Info.plist': Encountered unexpected character s on line 31"
I wrote it after the other keys and before
</dict>
A: change <string/> to </string> and you should be good
| |
doc_23537786 | So, I have this piece of code...
<?php
echo "<table style='border: solid 1px black;'>";
echo "<tr><th><font color='green'><center>Username</th><th><font color='green'><center>Total EXP</th><th><font color='green'><center>Online Time</th></tr>";
class TableRows extends RecursiveIteratorIterator {
function __constru... | |
doc_23537787 | <link class="ks-sidebar-dark-style" rel="stylesheet" type="text/css" href="assets/styles/themes/sidebar-black.min.css">
How to put class="ks-sidebar-dark-style" in StyleBundle BundleConfig.cs ?
Current config :
bundles.Add(new StyleBundle("~/bundles/bootstrap").Include(
"~/assets/styles/themes/sidebar-black.... | |
doc_23537788 | For Ex.: 4/7/2016
*
*Day: Monday
Here is my class:
public class Attendance
{
public int Id { get; set; }
public Nullable<System.DateTime> StartDateTime { get; set; }
public Nullable<System.DateTime> EndDateTime { get; set; }
}
When I am trying to do this:
var query = (from t in context.Attendan... | |
doc_23537789 |
I'm trying to convert the first column to rows
So it counts how many users that are speaking a language and using word, excel etc.
I've tried using the pivot but I can't figure out how to use it dynamically.
SELECT *
FROM (
SELECT kolomtellingwaarde,
regeltellingwaarde
FROM analytics_bindingresults
)
p... | |
doc_23537790 | Here's a short clip of the current situation: http://youtu.be/54WXDWxqmXw
I found an implementation example on how to do it over here:
http://www.opengl.org/discussion_boards/showthread.php/174093-GLSL-cube-shadows-projecting?p=1219162&viewfull=1#post1219162
It seemed fairly easy to understand, so I figured this would ... | |
doc_23537791 | I wanna search it by click a button , and the system auto according to "today",and choose the day "after one month" for example now is 11/26/2013 , by clicking the button , the system will choose the data dated 12/26/2013 and pump a msg out.
here is my code , i just wanna store today "day" into a variable and start sea... | |
doc_23537792 | Cross origin requests are only supported for HTTP. dojo.js.uncompressed.js:308
req.getText dojo.js.uncompressed.js:308
injectModule dojo.js.uncompressed.js:1522
doRequire dojo.js.uncompressed.js:6703
dojo.require dojo.js.uncompressed.js:6740
(anonymous function) index.html:63
Does anyone encounter this problem?
My ap... | |
doc_23537793 | I'm trying to use GoToStateAction to change the state with a DataTriggerBehavior, but it doesn't work and I have no idea how to debug it :(
I'm guessing that it is an issue with Interaction in a style, as I also tried changing the DataTriggerBehavior to an EventTriggerBehavior and that didn't fire either.
The Style:
<R... | |
doc_23537794 | int main (int argc, char **argv)
{
char user [10];
char *path = argv[1];
int result;
const char *filename = "/home/guima/TP1/Users";
result = access (filename, F_OK);
int fd;
fd = open(argv[1], O_RDONLY);
if (result == 0)
{
unlink(argv[1]);
write(1,"Deleted!\n\n", 35... | |
doc_23537795 | function ucFirst(str) {
var newStr = str.charAt(0).toUpperCase();
for (var i = 1; i < str.length; i++) {
newStr += str.charAt(i);
}
return newStr
}
alert(ucFirst("john"));
this will print out "John" along with an undefined in the console.
Now I tried the exact same thing using the array valu... | |
doc_23537796 | CREATE TABLE [GenContents]
(
[Id] INT NOT NULL IDENTITY (1,1),
[ModuleUniqueName] NVARCHAR(4000) NOT NULL,
[ResponseContent] NTEXT,
[Category] NVARCHAR(4000) NOT NULL,
[Language] NVARCHAR(4000) NOT NULL,
... | |
doc_23537797 | I managed to write some queries that for example check if the username that is entered in my RN app matches the one that is on the DB and returns its userID.
I know that on my DB every User has its Password that is being stored inside the DB in a hashed way.
How would a Query look like that would return for example the... | |
doc_23537798 | CarsB cars = CarsB(lastname: 'Uysal', firstname: 'Kerem');
print(cars.firstname);
}
class Cars {
String firstname = '';
String lastname = '';
int yas = 0;
Cars(
this.yas, {
this.firstname = '',
this.lastname = '',
});
}
class CarsB extends Cars {
CarsB({String firstname = '', String lastna... | |
doc_23537799 | 1 city1 85 100 0.05
2 city2 80 100 0.05
3 city3 34 100 0.32
I want to return a list of tuples representing the lines in the file.
The items should be of type int except for the name string
and the weight float
So the result would be like this:
[(1, 'city1', 85, 100, 0.05), (2, 'city2', 80, 100, 0.05), (3, 'city3', 34... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.