id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_20900 | The code:
$data = '
<p>
{
asdf
asdf
asdf
}
</p>
';
echo preg_replace('%{(.*)}%m', '<div>\1</div>', $data);
The output should be:
<p>
<div>
asdf
asdf
asdf
</div>
</p>
What am I doing wrong here?
A: Use the s modifier instead of the m modifier.
The s modifier allows . to match newlines.
The m modifier makes ^ and $ ... | |
doc_20901 | typedef void(*deleter)(void*);
template <class T> void deleteVoidPointer(void* target)
{
delete static_cast<T*>(target);
}
int main()
{
void* p = new int;
deleter del = deleteVoidPointer<int>;
del(p);
return 0;
}
Are there any side effects I am missing here or is this a legit way to keep track of... | |
doc_20902 | Can anyone tell me what am I doing wrong?
My code is below:
tar( paste0(repoDir, "repository.tar"), files)
where files is something like this:
> files
[1] "/home/rexamine/archivist2/ex/backpack.db"
[2] "/home/rexamine/archivist2/ex/gallery/019685d39afcc765103c62afe257a0e9.rda"
[3... | |
doc_20903 | My question is exactly that: What are the best practices for Ember JS? Are there any updated tutorials or working samples showing how Ember JS is intended to be used? Code samples would be great!
Thanks to everyone, especially the Ember JS devs!
A: I would highly recommend using Yeoman and its accompanying ember gener... | |
doc_20904 |
A: below is a custom callback that will do the job. At the start of training, the callback prompts the user to enter the value of the initial learning rate.
class INIT_LR(keras.callbacks.Callback):
def __init__ (self, model): # initialization of the callback
super(INIT_LR, self).__init__()
self.mod... | |
doc_20905 |
A: View the module with lm, it will tell you if the associated PDB is private. For example, this PDB is public:
0: kd> lm mntdll
start end module name
00007ffe`aee40000 00007ffe`af001000 ntdll (pdb symbols) c:\websymbols\ntdll.pdb\F296699DB5314A06935E88564D8CD2731\ntdll.pdb
... | |
doc_20906 | Source Code:
index.html:
<!DOCTYPE html>
<html lang = "en-US">
<head>
<title>Blog</title>
<script src = "loadXML.js">
</script>
<script>
function addComment1(form)
{
var xmlDoc = loadXMLDoc("one.xml");
var use = form.user1.value;
var com = form.comment1.val... | |
doc_20907 | from Tkinter import Tcl
import os
tcl = Tcl()
def validate_op(fetch, header, value):
tcl.eval('source tcl_proc.tcl')
tcl.eval('set op [tableParser $fetch $header $value]') <<<<< not working
proc tableParser { result_col args} {
..
..
..
}
A: The simplest way to handle this is to use the _stringify f... | |
doc_20908 | fp1 = []
for e0 in energy:
for i in range(elow, ehigh, stepsize):
fp1 = np.append(fp1, np.cumsum((2 / np.pi) * ((mu(element, e0) * i / ((e0 * e0)-)(i * i)))) * 2)
Relatively new to all this so assume I'm completely overlooking something.
Using Python 2.7 for this.
Cheers
A: Well the situation in which a e... | |
doc_20909 | i completed it successfully. but the autocomplete input box of places does not display options as per entered keywords, weather it displays all options what ever keyword is entered.
below is my php page :
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Autocomplete - Default func... | |
doc_20910 | On page loade, this dropdownList box, by deffault is invisible.
<td>
<asp:DropDownList ID="LongDistance" runat="server" style="display:none;" >
<asp:ListItem value="2">$2 per mile</asp:ListItem>
<asp:ListItem value="4">$4 per mile</asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator runat... | |
doc_20911 | I have a function func1, which concatenates strings from a char** arr until a semicolon is seen:
char * func1(int *i,int len,char **arr,char *path)
{
(*i)++;
char* str = malloc(1);
memset(str, 0, 1);
for (; *i < len; (*i)++)
{
char* currExp = arr[(*i)];
size_t currExpLen = strlen(cu... | |
doc_20912 | I got this error in my shell code.
A: You've to use this, it is because till now you've only declared the table not exactly created in you database, this will create/update table details in the database
python manage.py makemigrations
python manage.py migrate
Then reload the shell and run this command
| |
doc_20913 | This is my code with css class.
<a class="magic" href="whatsapp://send?text=This year Wish Happy Holi to your friends and their family in different way :) . Click on link and receive my Happy Holi Wishes :) Enter your name and send your Wishes.%0A👇ðŸ¾ðŸ‘‡ðŸ¾ðŸ‘‡ðŸ¾ðŸ‘‡ðŸ¾ %0Ahttp://www.themobilesapp.com/holi/holi?na... | |
doc_20914 | import org.apache.logging.log4j.core.Version
println(Version.getProductString)
A: Versions of all libraries included into Databricks Runtime are listed in the Databricks Runtime Release notes - if you select specific runtime version, you can find all necessary information. For example, if you open release notes for D... | |
doc_20915 | Is there a way to align things to the "end" instead of to the "right" using CSS? I am specifically targeting Webkit here.
Examples of what I'd like to do:
float: end; /* instead of float: right */
or
position: absolute;
end: 0px; /* instead of right: 0px */
Obviously neither one of these actually works.
I know it is ... | |
doc_20916 | Compiling your contracts...
Everything is up to date, there is nothing to compile.
/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/merkle-patricia-tree/node_modules/async/lib/async.js:358
callback(err);
^
Error: Callback was already called.
at /usr/local/lib/node_modules/truffle/build/webpack:/node_mo... | |
doc_20917 | The command I am running are:
for f in $x/*/y/*.fastq; do
fullpath=`echo $(readlink -f $f)`
basename=`echo "${fullpath##*/}"`
pathname=`echo "${fullpath%/*}"`
name=`echo "$basename"|sed 's/-_-.*//'`
cat $f>>$x/z/${name}.fastq
done
also, alternatively
names=$(cut -f 3 $B)
names=$(echo "${names[@]... | |
doc_20918 | Since Mongo is a database and I am using node selector, is there any reason for me not to use Kubernetes Deployment over StatefulSet? Elaborate more on this if we should never use Deployment.
A:
Since mongo is a database and I am using node selector, Is there any reason for me not to use k8s deployment over StatefulS... | |
doc_20919 | Error: JvmField can only be applied to final property
What could be the solution here? Requirement is:
*
*I need @JvmField for java consumers as I don't want to refactor the code to use the setter/getter method and want to use as a field.
sealed class PowerTool(
@JvmField open val name: String,
@JvmField ope... | |
doc_20920 | '**_fields_**': [('rlcAmUlConfig', <class 'l2types.struct_L2_DB_RLC_AM_UL_Config'>), ('rlcAmDlConfig', <class 'l2types.struct_L2_DB_RLC_AM_DL_Config'>)],
'rlcAmDlConfig': <Field type=struct_L2_DB_RLC_AM_DL_Config, ofs=20, size=12>,
'**__slots__**': ['rlcAmUlConfig', 'rlcAmDlConfig'], 'rlcAmUlConfig': <Field type=stru... | |
doc_20921 | class A:
def __init__(self):
#some huge data stored in self parameters.
class B:
def __init__(self):
A.__init__(self)
class C:
def __init__(self):
A.__init(self)
So both classes B and C uses class A as a parent class and class A has huge data initialised which can be used by both classes B a... | |
doc_20922 | The API looks fairly straightforward, and I've not had issues with the dozen other APIs I've used. I just can't figure out where this is going wrong. Here's the code I'm using for this:
import os
import sys
import requests
_credentials = ("user@example.com", "password")
def post_file(url, file_path, file_name):
... | |
doc_20923 | /**
* @var integer
*
* @ORM\Column(name="vragenlijst_id")
* @ORM\ManyToOne(targetEntity="GroNed\AdminBundle\Entity\WalkthroughType")
* @ORM\JoinColumn(name="vragenlijst_id", referencedColumnName="id", nullable=true)
*/
private $vragenlijst;
However: Doctrine seems to disagree with me:
[bhillier@devserver-2 S... | |
doc_20924 | Export data into Excel, Word and PDF with Formatting
This how I have use this code in my project
foreach (var enq_item in enquiries)
{
enquiry_list.Add(new enquiry_master
{
enquiry_source_id = enq_item.enquiry_source_id,
reference_no = enq_item.reference_no,
... | |
doc_20925 | like, we will have a URL something like this : https://xxxx.com/index.php?r=socialmedia/view&name=CapitolYardsDC
So then we will display Public Content of Instagram for that Property in above URL. But for that we will need developer account,
But we have a 200+ properties, so creating developer account for each property... | |
doc_20926 | My command as it works in the terminal is
samtools view $file.bam |
perl -ne 'if ($_ =~ m/NM:i:(\d+)/) {print $1, "chr(10)"}' > $file.nm
I test my program with the file 'M1.10.fasta'
I have copied my code:
#!/usr/bin/perl -w
use strict;
my $read1 = 'Intesti-cocktail_R1.fastq';
my $read2 = 'Intesti-cocktail_R2.f... | |
doc_20927 | my Play application is using a jar that use Spring.
I'm using class configuration for spring.
The Problem:
When I deploy the war and try to enable it, it shows me jboss error that caused by spring error.
The JBoss error:
JBAS014671: Failed Service
The Spring Error:
Error creating bean with name EntityManagerFactory ... | |
doc_20928 | time name value1 value2
12:00 Hans 2 4
12:30 Hans 2 4
13:00 Hans 3 5
14:00 Peter 4 4
15:00 Peter 4 4
I want to filter by maximum time stamp and name.
Meaning I want to get
13:00 Hans 3 5
15:00 Peter 4 4
Using select max(t... | |
doc_20929 | class HeroUploader < CarrierWave::Uploader::Base
# Include RMagick or MiniMagick support:
include CarrierWave::RMagick
#include CarrierWave::MiniMagick
# Include the Sprockets helpers for Rails 3.1+ asset pipeline compatibility:
include Sprockets::Helpers::RailsHelper
include Sprockets::Helpers::Isol... | |
doc_20930 | My directory structure:
*
*root
*
*exercises
*
*ex1
*
*FileLoader.js
*FileOne.js
In my FileLoader.js I ran each one of these file path patterns by itself. They are in the order of my attempts.
require('./exercises/ex1/FileOne.js'); // Attempt 1 path
require('FileOne.js'); // Attempt 2 path
require('/ex... | |
doc_20931 | I'm having an issue which MQ process amqrmppa are keep increasing which currently there are 635 processes exist. Previous 2 days it only have 2++ processes but keep increasing slowly until current value.
MQ version = 8.0
Operating System = AIX 7
This processes expected to be increase until our maxuproc limit which is 1... | |
doc_20932 | import iminuit
def func(x,y):
fun = 2*x**2 + 3*y + 5
return fun
m = iminuit.Minuit(func, x=1, y=1, limit_x=(0,100), limit_y=(0,50))
What I get is the error message
/usr/local/lib/python3.6/dist-packages/iminuit/minuit.py in _make_init_state(pos2var, args, kwds)
1537 if kw not in pos2var:
1538 ... | |
doc_20933 | More generally, I would like to avoid the overhead of calling external services to retrieve this information, as it will be used in a custom lambda authorizer, so I want it to be fast and not rely on any external dependencies where possible.
I was thinking of retrieving the JSON from Parameter Store and baking it in to... | |
doc_20934 | i've tried lookin up the internet but nothing fits my need
this is my effect
/**
* EFFECT TO GET ALL USRS FROM THE KEYCLOAK SERVER
*/
loadUsers$ = createEffect(() => this.action$.pipe(
ofType(LOAD_USERS),
switchMap(() => {
return this.userService.fetchAll().pipe(
... | |
doc_20935 | #: 177 101 User 1 Channel: SIP/101
#: 178 117 User 2 Channel: SIP/117
#: 179 150 User 3 Channel: SIP/150
#: 356 166 User 4 Channel: SIP/166
#: 387 117 User 2 Channel: SIP/117
I'd like to find duplicates based on the SIP/ part of the log file but I will need to execute a scr... | |
doc_20936 | DT1 <- data.table(id = 1:6, junk = c("T", "U", "V", "X", "Y", "Z"),
type = c("A", "B", "B", "B", "A", "C"))
DT2 <- data.table(id = 4:6, junk = c("X", "Y", "Z"),
type = c("B", "A", "C"))
That is,
> DT1
id junk type
1: 1 T A
2: 2 U B
3: 3 V B
4: 4 X B
5:... | |
doc_20937 | I have a number of functions which basically rely on a rolling index of a variable, with a function, and should naturally flow back into the dataframe they came from.
For example,
data<-as.data.frame(as.matrix(seq(1:30)))
data$V1<-data$V1/100
str(data)
data$V1<-NA # rolling 5 day product
for (i in 5:nrow(data)){
... | |
doc_20938 | It doesn't work when the data in the column is a number. If I change the number to a text it works. How can I get it to work with numbers also?
Sub uniqueYear()
Dim myCollection As Collection
On Error Resume Next
Set myCollection = New Collection
With Me.cbxYear
.Clear
For Each cell In Sheets("Sheet1").r... | |
doc_20939 | $outlook = New-Object -Com Outlook.Application
$mapi = $outlook.GetNamespace('MAPI')
$mailboxRoot = $mapi.GetDefaultFolder([Microsoft.Office.Interop.Outlook.OlDefaultFolders]::olFolderInbox).Parent
$mailboxRoot.Folders[2].Items[1].Body
$mailboxRoot.Folders[2].Items[1].RTFBody
$mailboxRoot.Folders[2].Items[1].HTMLBody
... | |
doc_20940 | This is how it works: publishers can add a website and then add unlimited adspaces to it, so they can have multiple banners running on the same page or different pages.
WEBSITES
id | url
ADSPACES
id | website_id | info
VIEWS
id | adspace_id | ip | date (YYYY-MM-DD)
ADSPACES_STATS
id | adspace_id | views | date (YYYY... | |
doc_20941 | java -jar jenkins-cli.jar -s http://localhost:8080/ help
But when I enter this command, the following error is returned:
Error: Unable to access jarfile jenkins-cli.jar
I don't know why this is returned. Could it be connected with me using a Windows machine? Why does this happen, and how could it eventually run?
A... | |
doc_20942 | Caused by: org.sonatype.aether.transfer.ArtifactNotFoundException: Could not find artifact directory:apacheds-core:jar:${apacheds_version} in central (http://localhost:8081/nexus/content/repositories/central)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:945)
at or... | |
doc_20943 |
In the input that allows the user to change their location, the only value that is modified is location. However, I think there's a bug that changes the password as well. The password is stored as a hash value. Therefore, when the put request is made, I think the location update onClick is passing in the hashed value ... | |
doc_20944 | Essentially when I click to build, I get the errors below. I am not entirely sure what it all means and I have been busy for the past hour trying to figure out what it means but I would appreciate a more informed explanation of what the errors mean and how I can go about get rid of them.
class Product: public QObject
{... | |
doc_20945 | public class GalleryFragment extends Fragment {
private GalleryViewModel galleryViewModel;
private ActionModeCallback actionModeCallback;
private ActionMode actionMode;
public View onCreateView(@NonNull LayoutInflater inflater,
ViewGroup container, Bundle savedInstanceState) {
galler... | |
doc_20946 | THE CODE:
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.methods.HttpGet;
import... | |
doc_20947 | <Sidenav>
<SidenavSection title={'Develop'}>
<SidenavItem>Authentication</SidenavItem>
<SidenavItem>Test</SidenavItem>
</SidenavSection>
</Sidenav>
So I created SidenavSection - group of items, a... | |
doc_20948 | I'm developing Javascript game. I need to call PHP file to connect to databaase and select some data from database. This data should be passed to Javascript.
I've checked Chris Baker's answer here: Call php function from javascript
The javascript
// handles the click event for link 1, sends the query
function getOutp... | |
doc_20949 | for some reason in console the new arr is empty (history = [])
and in localStorage, savedgameHistory = [{},{}]
*SORRY! I didn't explain myself right, I need to save the array order. in order to use it in an UNDO button.
const img1 = document.getElementById("img1"); // img tag
const img2 = document.getElementById("img2... | |
doc_20950 | <iframe src="http://docs.google.com/viewer?url=URL-encoded-URL&embedded=true" width="750" height="960" style="border: none;"></iframe>
(where URL-encoded-URL is an actual encoded URL).
For many/most of my users, the Google PDF Doc viewer appears and displays the referenced PDF.
But some of my users instead see the Goo... | |
doc_20951 | At the moment, I am trying to convert an object of type "language" to "expression" so that I can plot it.
First I create the function I want to plot:
> model <- nls(y~a+b*exp(x*z),start = list(a=1, b = -.5, z = -.8),data=results)
> modelsym <- substitute(a+b*exp(z*x), list(a=coef(model[1],b=coef(model)[2],z=coef(mode... | |
doc_20952 | What I am doing
SET name = "Casey"
ECHO "Hey" + name > file.txt
The result
"Hey" + name
What I want
"Hey Casey"
A: You should do it like this:
SET name=Casey
ECHO "Hey %name%" > file.txt
Note that there is no spaces before and after the = in
name=Casey
A: Too bad syntax, you need to forget other programming... | |
doc_20953 | I did structures, etc.
struct NET_PROTO_HEADER
{
unsigned int mLength;
unsigned short mPacketGroup;
unsigned short mPacketType;
};
struct NET3_SERVER_DISCONNECT : public NET_PROTO_HEADER
{
unsigned char mType;
};
But when I try to send it, sizeof method returns size 12 and it's sended with addonitiona... | |
doc_20954 | Furthermore – and this might be relevant later – we know that this login system is installed on a computer running MyOS, and that this operating system is known to have a file with its version - in this case, 1.0.3 - in "/system/version.txt".
Can you devise some credentials that will log you into the system, without kn... | |
doc_20955 | <div style="height: 100px; width: 700px; outline: 1px dotted blue;">
<div style="text-align: center;">
<div style="width: 100px; height: 50px; display: inline-block; outline: 1px solid red;">
</div>
</div>
</div>
A: Margin auto in the inner div should resolve your issue. Try the following.
#outer-element{
... | |
doc_20956 | For example, given a quadratic function:
g(x): a*x**2 + b*x + c = 0
The test looks like:
if sign of g(x0) is opposite of sign of g(x1)
then return true
else return false
For multivariate case there is Poincaré–Miranda theorem but I have a bit of difficulty to implement the test correctly from reading the linked artic... | |
doc_20957 | I use the AWS IoT C++ SDK with OpenSSL. When creating the network::OpenSSLConnection object, I configured the endpoint_port parameter to 443 and enable_alpn to true. Where can I set the protocol to x-amzn-mqtt-ca? The connection seems to work that way, and TCPView shows that it actually uses the HTTPS port.
A: Did you... | |
doc_20958 | {
"code": 400,
"message": "This is a message which describes why there was a code 400."
}
It returns 400 as the status code but also includes a descriptive error message to tell you what you did wrong.
However the JAX-RS 2.0 client is re-mapping the 400 status into something generic and I lose the good error ... | |
doc_20959 | HTTP/1.1 200 OK
Content-Length: 317
Content-Type: application/json
Server: Microsoft-IIS/7.5
Last-Modified: Wed, 19 Feb 2014 11:30:16 GMT
Via: 1.1 SC10100_83_75
Connection: keep-alive
Date: Wed, 19 Feb 2014 12:00:47 GMT
The problem is, this seems to be caching my request and is not returning the latest values. I suspe... | |
doc_20960 | 400 bad request error in ejabberd
I guess there is some issue with the permissions. Here is my configuration file:
https://www.dropbox.com/s/his89bx39qhvr1h/ejabberd2.yml?dl=0
I have tried to follow the official documentation. As per the API permission guide, I have also tried adding following properties:
api_permissio... | |
doc_20961 | Imported the styles and scripts.
<link rel="stylesheet" href="fullcalendar/fullcalendar.css"/>
<link rel="stylesheet" href="fullcalendar/fullcalendar.print.css"/>
<script src="https://code.jquery.com/jquery-2.1.3.js"></script>
<script src="fullcalendar/lib/moment.min.js"></script>
<script src="fullcalendar/lib/jquery.... | |
doc_20962 | I have two observables - width and height. These values are initially set by grabbing the width and height of a clicked element, so no calculation is needed for this part. The issue is that, once the initial values are captured, I want to maintain the aspect ratio for all future changes. So if the user updates the wi... | |
doc_20963 | HTML (Heart.cshtml)
<head>
<script type="text/javascript" src="~/Scripts/heartBeat.js"></script>
</head>
<body>
<script type="text/javascript">
LaunchHeartBeat('@Url.Action("KeepSessionAlive", "Auxiliary")');
</script>
</body>
Javascript (heartBeat.js)
var isSuccess = false;
function LaunchHeartBe... | |
doc_20964 | <?php
$arr = array(
array(
"image" => "",
"title" => "Open 7 days.",
"text" => "We’re open 7 days a week."
),
array(
"image" => "",
"title" => "Well done",
"text" => "Well done you done great."
),
array(
... | |
doc_20965 | Ideally I would want to do something similar to this express practice.
const app = express();
app.use('/api/users', usersRestApi);
app.get('/', (req, res) => {
res.send('Hello World');
});
// Create MongoDb connection pool and start the application
// after the database connection is ready
MongoClient.connect(conf... | |
doc_20966 | ||
doc_20967 | TODAY=timezone.localtime()
AFTER_6MONTH = datetime.timedelta(days=180)
class TestView_Time(TestCase):
def setUp(self):
TimeSchedule.objects.create(start_date=TODAY,
end_date=TODAY+AFTER_6MONTH,
round_number=1,
... | |
doc_20968 | The addon is still unpublished because it's under development, and to further develop the script, I want to catch the onFormSubmit event, and do some stuff with the user's submitted data.
I tried adding a new trigger programmatically, but in doing so, the addon just bails, as in, the addon disappears, and doesn't reloa... | |
doc_20969 | Unable to process files: [(array of files)]
What's strange is if I reset my changes it works fine. Any ideas?
UPDATE I found the line of code causing the issue. It's this line:
if (!(o instanceof final MyObject that)) {
This line is using a Java 16 feature, which compiles for me as that is the java version I am using. ... | |
doc_20970 | In very short the external backup drive is mounted using
mount -t cifs //external/backup/drive/path /media/drive/ -o user=a_user,password=a_password
For new repo, my script does
sudo git clone --mirror file:///new_repo
For existing repos
sudo git remote update
Everything went OK, but recently I started to get error ... | |
doc_20971 | Is there a way to get the title in msgProdStockOut directly?
g)
import requests
from bs4 import BeautifulSoup as soup
my_url = 'https://www.gu-global.com/tw/store/goods/325571'
r = requests.get(my_url).content
soup = soup(r, 'html.parser')
soup.find(id = 'msgProdStockOut')
#None
soup.find(id = 'prodMainImg ').text
... | |
doc_20972 | As it stands right now, I have no problems associating another item's name with an item. Unfortunately, as names are not necessarily unique, I want to associate the item with another item's _id after selecting the other item's name from a dropdown. There are two primary questions I have:
1) How do I set a default value... | |
doc_20973 | 0 1 2 3 4 5 6 7 8
0 Twitter (True 01/21/2015) None None None None None None None None
1 Google, Inc. (True 11/07/2016) None None None None None None None None
2 Microsoft, (True 07/01/2016) Facebook (True 11/01/2016) None None None None... | |
doc_20974 | [Unit]
Description=RUNNING BUILD IN TESTING SCRIPT
[Service]
Type=simple
ExecStart=/bin/sh -c 'sleep 5 ; /usr/sbin/check_emmc.sh'
ExecStart=/bin/sh -c 'sleep 5 ; /usr/sbin/blinkled.sh'
[Install]
WantedBy=multi-user.target
However, this method only work one script, is it possible to make one service to run multiple s... | |
doc_20975 | My problem is I have a large body which can be a seperate html file. For this I have created a view and I am trying to send the argument $this->load->view('viewname'); through the helper function in my controller. But instead of displaying the body in mail I get the file displayed on my final view page and the mail bo... | |
doc_20976 | // mybashscript is in the bundle app (NSlog grant that is ok!)
NSDictionary*errorDict = nil;
NSAppleScript*mycommand;
NSString *mycommand = [mybashscript stringByReplacingOccurrencesOfString:@" " withString:@"\\ "];
// NSString *mycommand = [[mybashscript stringByReplacingOccurrencesOfString:@" "... | |
doc_20977 | The below works OK, but I think it's ugly - I'd like a solution that doesn't need a separate #define for every possible invalid value passed as "port".
#define _port_A_config_digital(mask) // do nothing; this port is always digital
#define _port_B_config_digital(mask) AD1PCFGSET = (mask)
#define _port_C_c... | |
doc_20978 | <Button Grid.Column="2" Grid.Row="6" Grid.ColumnSpan="3" Grid.RowSpan="2" Content="{Binding FirstSchedule.Message}" Command="{Binding FirstScheduleButtonClick}">
<Button.Style>
<Style TargetType="Button">
<Setter Property="Background" Value="LightGray"></Setter>
<Style.Triggers>
... | |
doc_20979 | In other words, is the cache guaranteed to always return the same objects, or is it possible that it might drop entries and recreate them as new objects at some later point?
Note that the documentation for its overloads isn't helpful in that regard, and the alternative is of course to use the Object.Equals method.
A: ... | |
doc_20980 |
A: See this thread. It shouldn't doesn't matter if the URL is generated in runtime. Can you call a function to encode it before passing it to your other function?
A: I had the need to read a URL GET variable and complete an action based on the url parameter. I searched high and low for a solution and came across this... | |
doc_20981 | Im trying to delete an element inside list with the same data-id as foo
let foo = document.querySelector('.foo');
let list = document.querySelector('.listing-filter');
let fooId = foo.dataset.id;
let listId = list.dataset.id;
let listingFilter = () => {
if ( typeof fooId !== 'undefined' && typeof listId !== 'undef... | |
doc_20982 | Apparently, when I try to execute this, 'INSERT_EXEC can't be nested' error is shown.
Msg 8164, Level 16, State 1, Procedure sp_kbbl_WachLista_Priprema, Line 24
An INSERT EXEC statement cannot be nested
Here is the code sample...
CREATE TABLE #WL_Klijenti ( [Datum_Izvjestaja] varchar(10), [Aplikacija]
varchar(10),... | |
doc_20983 | P.S. I know I can get away with '.txt' or ./.txt as parameters just not *.txt.
Maybe I should just call it a documentation issue ;-)
A: Yes, OSX is linux, and I assume you are in the default bash shell. So the shell expands .txt before passing it to node. To change this behavior simply wrap the command argument with... | |
doc_20984 | var gridDomReference = null;
var gridDimension = 15;
var timer = null;
function init() {
gridDomReference = document.getElementById('grid');
idleCells = new Array();
liveCells = new Array();
deadCells = new Array();
drawGrid();
createRandomLiveCells();
}
function drawGrid() {
var count... | |
doc_20985 | import numpy as np
from scipy.optimize import minimize
def eq( p ):
s1,s2,s3 = p
f1 = 1.1**3 / s1*1.1**1+s2*1.1**2+s3*1.1**3
f2 = 0.9**1 / s1*0.9**1+s2*0.9**2+s3*0.9**3
return (f1, f2)
bnds = ( (0, None), (0, None), (0, None) )
cons = ( { 'type' : 'ineq', 'fun': lambda p: p[0]+p[1]+p[2] - 1} )
min... | |
doc_20986 | I've stripped a test case down to the simplest I can come up with, but no luck. The solution is a simple main window WPF application and then a C# library with the custom shape class. Application has a project reference to the C# library and the custom shape shows up just fine in the toolbox.
The pictures below sho... | |
doc_20987 | 200 GET https://some-saml2-idp.com/saml2/idp/SSO_1..39%3D&RelayState=Os..j
302 POST https://demo.local/AuthServices/Acs
200 GET for the set RedirectUri
After upgrading to Sustainsys.Saml2.Owin 2.2.0 I get this traffic log...
200 GET https://some-saml2-idp.com/saml2/idp/SSO_1a7f5..sy%2Fh9rebTw%3D%3D&RelayState=1M..3c
3... | |
doc_20988 | function jma_woo_minicart($atts){
ob_start();
global $woocommerce;
echo '<a class="cart-contents" href="' . ' $woocommerce->cart->get_cart_url()' . '" title="View your shopping cart">';
echo sprintf(_n('%d item', '%d items', $woocommerce->cart->cart_contents_count, 'woothemes'), $woocommerce->cart->c... | |
doc_20989 | Is there a reset switch?
Any ideas?
A: The data is stored locally at %localappdata%\Packages\<packageID>. You can delete it from the client directly from there. See Accessing app data for more info.
A: Better late to the party then never, but:
You can do this by right clicking on your app in the solution explorer,... | |
doc_20990 | and send it via email to customer in asp.net
please help
Thanks in Advance
Regards.
Zain
A: You can use:
iTextSharp:
iTextSharp is a C# port of iText, and open source Java library for PDF generation and manipulation. It can be used to create PDF documents from scratch, to convert XML to PDF (using the extra XFA Worke... | |
doc_20991 | I have for example this table inside a database:
Click to show image
I want to extract data resulting from this query.
SELECT name
FROM movies
WHERE year between 1995 AND 2001
AND rank between 6 and 9;
How can I do it with Django?
A: Movie.objects.filter(year__range(1995, 2001), rank__range(6, 9))
You can use filters... | |
doc_20992 | I want to change some content-elements of bootstrap_package, but I have to prevent from overwritting my changed data during a update of the extension.
But I don't know how I can prevent it?
I'll change some codes of some exist files and add some new files in the extension "Bootstrap_package".
For example, HTML-files, C... | |
doc_20993 | What is the strict minimum to know about Websphere? They will ask me if I have ever used it and I will say no but I would like to have a few things to say in order to lower the impact of not knowing it.
Thank you very much for your help
A: You need to know just enough to be able to rip it out and replace it :-)
A: B... | |
doc_20994 | Foldername/pay.php
This files call api and work with some lib. when i call it through direct in the browser url.
I want to call this within magento function.
pay.php have a class and I add this file within a magento module file and make a object but it shows the error of object reference.
What should i do? Please sugge... | |
doc_20995 | I got the text in the command_Line
$ phpunit --bootstrap vendor/autoload.php tests/EmailTest
PHPUnit 3.7.21 by Sebastian Bergmann.
Cannot open file "vendor/autoload.php".
A: It appears that you have different installations of PHPUnit mixed up.
For instance, you may have used Composer to install PHPUnit and have conf... | |
doc_20996 | {"id":"335057af-a156-41c6-a0de-0cdc05856b3d",
"title":"Test 100488-100489 not included",
"code":"QWNCY47Y999",
"start":"2022-08-10T22:00:00.000Z",
"end":"2022-08-11T02:00:00.000Z",
"closeAfter":"2022-08-08T23:59:00.000Z",
"archiveAfter":"2022-11-08T22:00:00.000Z",
"timezone":"America/New_York",
"defaultLocale":"enUS",
... | |
doc_20997 | Language is being changed according to language selection in Activities and Fragments but sometimes its doesn't change in AlertDialog. Please suggest me what I am doing wrong.
Below are the details.
Class & Method to show dialog
public class AlertDialogManager {
public static void showAlertDialog(Context ctx, String me... | |
doc_20998 | My query doesnot enter the loop to check if the name already exists.
I am fairly new to google-could. If someone can tell me on how I can fix my problem or if there is a better solution.
else if ( commandEls[0].equals( "add_director" ) ) {
String name = commandEls[1];
String gender = commandEls[2]... | |
doc_20999 | Please note that my asterisk and sipml5 are on the same server.
[Jan 3 16:48:43] ERROR[10158]: netsock2.c:269 ast_sockaddr_resolve: getaddrinfo("df7jal23ls0d.invalid", "(null)", ...): Name or service not known
[Jan 3 16:48:43] WARNING[10158]: chan_sip.c:15894 __set_address_from_contact: Invalid host name in Contact:... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.