query_id stringlengths 4 64 | query_authorID stringlengths 6 40 | query_text stringlengths 66 72.1k | candidate_id stringlengths 5 64 | candidate_authorID stringlengths 6 40 | candidate_text stringlengths 9 101k |
|---|---|---|---|---|---|
4c485fcf1363927933726bd57a9f887f9b38ed8283c0137fe90b28291404606c | ['776e07e155724b2ea9d852fc6ceb59ec'] | Thank you. No I don't store the value for each user. the user is going to rate, and the new average will be based on the existing average + the new rate. Does your equation mean that EACH user voted as 4? How will it be pushed to the previous value, can you elaborate? | 6dfd9d346d2f2c5e2c0ca7c8eaf9ca9990bd3306fff19caeefdd5822d6d1ed4d | ['776e07e155724b2ea9d852fc6ceb59ec'] | Let's say I have 20 people who rated a service, the average rating for them was 4/5. If a new person did the rating for 3/5, what's the new average of rating?
Note the answer doesn't have to be exact, I am using the calculation for rating component, so I am going to round the result as I will have only integers.
|
96fc5aff40955f2865d55c624c4e6eb6786626d60329ccf6d922dc6b94d3e217 | ['776f96cd7ff74935bd63bda16cc5ee9a'] | I want to place a particular value from the server at the top of the table view i.e. the first row
I want to place feedback from the user at the top of the table view
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
tableView.tableFooterView = UIView(frame: .zero)
if let cell = tableView.dequeueReusableCell(withIdentifier: "AllFeedbackCell", for: indexPath) as? AllFeedbackCell {
cell.feedback = feedbacks?[indexPath.row]
return cell
}
return UITableViewCell()
}
var feedback: Feedback? {
didSet {
if let username = feedback?.username, !username.isEmpty {
userEmailLabel.text = username
} else {
if let userEmail = feedback?.email, let emailIndex = userEmail.range(of: "@")?.upperBound {
userEmailLabel.text = String(userEmail.prefix(upTo: emailIndex)) + "..."
}
}
feedbackDateLabel.text = feedback?.timeStamp.getFirstChar(10)
userFeedbackLabel.text = feedback?.feedbackString
if let avatarURLString = feedback?.avatar {
let imageURL = URL(string: avatarURLString)
gravatarImageView.kf.setImage(with: imageURL)
}
roundedCorner()
}
}
}
Actually, I am getting all the feedback from the users and I want the user feedback at the topmost cell so that I can implement edit and delete feedback functionality.
| 610022db09ff23beab205f8dbe3290210f0f30677259af71f772a65b22970534 | ['776f96cd7ff74935bd63bda16cc5ee9a'] | I am working on a project and i need to how to disable the character limit in swiftlint config file , so how to disable the character limit ??
Here is the swiftlint file
disabled_rules:
- force_cast
- force_try
- variable_name
- type_name
- file_length
- type_body_length
- cyclomatic_complexity
- function_body_length
- valid_docs
- trailing_whitespace
opt_in_rules:
- empty_string
excluded:
- Carthage
- Pods
- SwiftLint/Common/3rdPartyLib
line_length:
warning: 150
error: 200
ignores_function_declarations: true
ignores_comments: true
ignores_urls: true
custom_rules:
smiley_face:
name: "Smiley Face"
regex: '( :\))'
match_kinds:
- comment
- string
message: "A closing parenthesis smiley :) creates a half-hearted smile, and thus is not preferred. Use :]"
severity: warning
|
023acc367f11252d7691326c8747fdd7989ba2954841663e2b0a9c7b83280ab0 | ['77803712983f493fb73e224f94db1ea5'] | @zvrba: What a superb explanation!!! <PERSON> for that. Now I have a doubt: Don't you think that INTEL could have won the big prize by making segments non overlapping and 4GB capable with help from paging? I mean, as I understood, "segmentation with paging" is only capable of addressing a max of 4GB virtual memory address space. And that's 'peanuts'!!! Imagine being able to have a Code, Stack, Data segments as big as 4GB each and non-overlapping or overlapping as you would need! And that would have been a major success at the time, without having to call for a full 64bit architecture as nowdays. | c8cdafd9abd26b2226e5559146f494b4f08bdda622b294e4c8f102a644032f73 | ['77803712983f493fb73e224f94db1ea5'] | Someone email me message with code and I would like to ask him if the code that he sent is relevant for me.
I thought to send email back with this sentence:
Is this code relevant for me?
Also, I am not sure what is the differences between this and that, so the sentence below sound's good to me:
Is that code relevant for me?
Thank you.
|
8ab62ad083df5440a35ba8300e0a24d39a15b2528d2b5c4017c8d55cd7dfa8d4 | ['77816b37a1e541b0a22a8e6f4efd98fa'] | Yes more or less to all. I didnt know about nomedeset when I first tried 64 so I havnt used it since. I havnt tried to load 10.04 on Samsung as I downloaded 11.10 presuming drivers more modern. I am happy to try any combinations you think might help. I have had advise about installing latest driver into home\antony\etc but as I can see the directories I would need to find a way to copy a downloaded driver into there. I have also looked at sudo apt-get remove radeon-* but there is a sever warning message so didnt proceed.. Thanks | 36ff87bedbe14892a8390d5e9ad12de7c45168e4c6609a534ded748e3e1312ee | ['77816b37a1e541b0a22a8e6f4efd98fa'] | @MostafaMirabi There are other examples that feel more like “cheating” (but perhaps illustrate the point better). Let $L$ be a language with binary relation symbols $R_n$ for $n\geq0$. Let $M_n$ be an $L$-structure such that the reduct to $R_n$ is a model of ZFC, and $R_m$ is equality for $m\neq n$. Then a nonprincipal ultraproduct $\prod_U M_n$ is just an infinite set with no structure. |
beb84840839a8d107572b245bb750502a7699c4725d7b14da6312611d0a483dc | ['7786002005e54509b4a9b9af64d8eb5d'] | Since I've installed Ubuntu on my laptop (Asus Zephyrus-G-GU502DU-GA502DU) I'm having trouble with nvidia-drivers.
I haven't been able to see whether the GPU is actually being used or not since nvidia-smi has never listed processes.
This is the output of nvidia-smi:
nvidia-smi
Thu Oct 24 18:54:<PHONE_NUMBER>
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 435.21 Driver Version: 435.21 CUDA Version: 10.1 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 166... Off | 00000000:01:00.0 Off | N/A |
| N/A 47C P0 3W / N/A | 0MiB / 5944MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
And this is the output of nvidia-settings:
nvidia-settings
ERROR: Unable to load info from any available system
(nvidia-settings:8935): GLib-GObject-CRITICAL **: 19:44:58.765: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
** Message: 19:44:58.768: PRIME: No offloading required. Abort
** Message: 19:44:58.768: PRIME: is it supported? no
And some other useful(maybe) info:
lsmod | grep nouveau
lsmod | grep nvidia
nvidia_uvm 913408 0
nvidia_drm 49152 0
nvidia_modeset 1122304 1 nvidia_drm
nvidia 19517440 8 nvidia_uvm,nvidia_modeset
drm_kms_helper 184320 2 amdgpu,nvidia_drm
drm 491520 11 gpu*_sched,drm_kms_helper,amdgpu,nvidia_drm,ttm
ipmi_msghandler 102400 2 ipmi_devintf,nvidia
i2c_nvidia_gpu 16384 0
glxgears
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
622 frames in 5.0 seconds = 124.292 FPS
600 frames in 5.0 seconds = 119.951 FPS
600 frames in 5.0 seconds = 119.955 FPS
dpkg -l | grep -i nvidia
ii libnvidia-cfg1-435:amd64 435.21-0ubuntu2 amd64 NVIDIA binary OpenGL/GLX configuration library
ii libnvidia-common-435 435.21-0ubuntu2 all Shared files used by the NVIDIA libraries
rc libnvidia-compute-430:amd64 430.50-0ubuntu0.19.04.1~gpu0 amd64 NVIDIA libcompute package
ii libnvidia-compute-435:amd64 435.21-0ubuntu2 amd64 NVIDIA libcompute package
ii libnvidia-compute-435:i386 435.21-0ubuntu2 i386 NVIDIA libcompute package
rc libnvidia-compute-440:amd64 440.26-0ubuntu0~gpu19.04.2 amd64 NVIDIA libcompute package
ii libnvidia-decode-435:amd64 435.21-0ubuntu2 amd64 NVIDIA Video Decoding runtime libraries
ii libnvidia-decode-435:i386 435.21-0ubuntu2 i386 NVIDIA Video Decoding runtime libraries
ii libnvidia-encode-435:amd64 435.21-0ubuntu2 amd64 NVENC Video Encoding runtime library
ii libnvidia-encode-435:i386 435.21-0ubuntu2 i386 NVENC Video Encoding runtime library
ii libnvidia-fbc1-435:amd64 435.21-0ubuntu2 amd64 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-fbc1-435:i386 435.21-0ubuntu2 i386 NVIDIA OpenGL-based Framebuffer Capture runtime library
ii libnvidia-gl-435:amd64 435.21-0ubuntu2 amd64 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii libnvidia-gl-435:i386 435.21-0ubuntu2 i386 NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii libnvidia-ifr1-435:amd64 435.21-0ubuntu2 amd64 NVIDIA OpenGL-based Inband Frame Readback runtime library
ii libnvidia-ifr1-435:i386 435.21-0ubuntu2 i386 NVIDIA OpenGL-based Inband Frame Readback runtime library
ii nvidia-compute-utils-435 435.21-0ubuntu2 amd64 NVIDIA compute utilities
ii nvidia-dkms-435 435.21-0ubuntu2 amd64 NVIDIA DKMS package
ii nvidia-driver-435 435.21-0ubuntu2 amd64 NVIDIA driver metapackage
ii nvidia-kernel-common-435 435.21-0ubuntu2 amd64 Shared files used with the kernel module
ii nvidia-kernel-source-435 435.21-0ubuntu2 amd64 NVIDIA kernel source package
ii nvidia-prime 0.8.13 all Tools to enable NVIDIA's Prime
ii nvidia-settings 440.26-0ubuntu0~gpu19.10.1 amd64 Tool for configuring the NVIDIA graphics driver
ii nvidia-utils-435 435.21-0ubuntu2 amd64 NVIDIA driver support binaries
ii screen-resolution-extra 0.18 all Extension for the nvidia-settings control panel
ii xserver-xorg-video-nvidia-435 435.21-0ubuntu2 amd64 NVIDIA binary Xorg driver
dmesg -l err
[ 0.313637] pci 0000:00:00.2: AMD-Vi: Unable to write to IOMMU perf counter.
<PHONE_NUMBER>] tpm_crb MSFT0101:00: can't request region for resource [mem 0xbcbe8000-0xbcbebfff]
[ 2.446321] Error: Driver 'rtl8821ce' is already registered, aborting...
[ 4.144178] nvidia-gpu 0000:01:00.3: i2c timeout error e0000040
[ 5.144512] ucsi_ccg 2-0008: i2c_transfer failed -110
[ 5.144517] ucsi_ccg 2-0008: ucsi_ccg_init failed - -110
Some notes:
The battery runs out very fast. It never lasted more than 3 hours. Normally it's less than that.
It has always been like this. I've tried Ubuntu 18.04, 19.04 and now, 19.10.
It takes some to turn on/off from hibernation.
| 36f22b5c59c5104ce2f3253be3663644d21996d9b8aa28a3e12a1fea41756cde | ['7786002005e54509b4a9b9af64d8eb5d'] | Fix using Google Metadata Startup Script
https://cloud.google.com/compute/docs/startupscript
Create a script and add it to the Metadata:
chmod -R go-w /
chmod 440 /etc/sudoers
chmod 640 /etc/shadow /etc/gshadow
chmod 600 /etc/ssh/*_key /etc/ssh*key # whichever matches
chmod 710 /etc/ssl/private /etc/cups/ssl
chmod 1777 /tmp /var/tmp /var/lock
chmod 4755 /bin/su /usr/bin/passwd /usr/bin/sudo /usr/bin/sudoedit
chmod 2755 /var/mail /var/spool/mail
Restart server and voilá !
|
9f865f77b40cb275a2efce9608407d1832147a7544b665bc33ef6c4101ebdd56 | ['7791c4ef1d6545a5924728c4f983d12e'] | The problem was probably due to resizing the image size to 125*125 before feeding it to VGG16 net. It requires 224*224 image size else the image size may reduce to zero while training which is what was probably happening. Keeping image size as 224*224 removed all the errors and allowed the model to be trained on a bigger batch size.
| 5eee6364700145806412761f84239e634ddd87cb2e7ff362f3cfc9a34019d3fa | ['7791c4ef1d6545a5924728c4f983d12e'] | It's because you don't need to provide length to DATE datatype. Oracle Database uses its own internal format to store dates. Date data is stored in fixed-length fields of seven bytes each, corresponding to century, year, month, day, hour, minute, and second.The DATE datatype stores the year (including the century), the month, the day, the hours, the minutes, and the seconds (after midnight).
What should be written instead is-
CREATE TABLE DOCUMENTATION
(
NAME varchar2(200) not null,
VALUE varchar2(500) not null,
QUERY varchar2(200) not null,
INSERTDATE date not null
);
|
ddbefa2286437d408c5fc1ac91846a9edcb3b896515fd39eac3dae9d1bf147a9 | ['779e760b859140c59eef49d8bdaeb181'] | I have a home server that I want to upgrade (at long last :) from 16.04 LTS to 20.04 LTS. I put ubuntu-20.04-live-server-amd64.iso on a USB thumb drive and booted from it, and I got as far as "Profile Setup". But then after a few seconds that was replaced with a screen saying that an error had occurred, encouraging me to file a bug report (which I did of course). But how can I capture some diagnostics to post here to help identify the problem? It said something about writing the log to disk, but I don't know where it put it.
FWIW here are some more details. The computer is a Intel i5-2500K in a Gigabyte GA-Z68M-D2H motherboard. My boot disk has a swap partition at /dev/sda1 and the 16.04 partition at /dev/sda3. For 20.04 I used a spare 127G partition at /dev/sda2, asking the installer to format it ext4. There's also a 5-disk software RAID-6 array with one failed disk that I haven't replaced yet (so, state=clean,degraded, active devices=4) that I left unmounted during installation.
By the way I remember it offered to download an updated installer, 20.05.1 maybe. I said okay.
This sounds a lot like Ubuntu Server 20.04 LTS: Failed Install (subiquity...install_fail/add_info), except that my error screen contains less information. And in their case there was a RAID too... hmm . It also sounds a bit like When I am in profile set ubuntu server 18.04.1 an installation error occured, so I tried a couple of mirrors but that didn't change anything.
TIA everyone.
| bb86fe56c371a230f9d53b76b3819893fb2842c1607a32e34fd460bab1256ca4 | ['779e760b859140c59eef49d8bdaeb181'] | Update: I wasn't able to figure out exactly what was going wrong, but (as a guess) I tried installing on a partition on a new SSD (instead of sda that held the old 16.04 partition), and that worked. I guess there's something about the old volume that made the 20.04 installer fatally confused. Also, this means the RAID array wasn't a problem. I never did figure out if there's a good way to extract the installer logs, but now I don't need to anymore.
|
b79980818dd5977fabfe9e6d6ac53373a087b4b60b31426d1354d4fd4a3a530c | ['779eecc85b524d5d954d0a8718975243'] | I think I found what is the problem, it's my change to author-year for verbose-ibid. I now tried to exclude the Year in the .bib for the sources where I don't want any year. But then I get (n.d.) instead. I would like it to be nothing if Year is undefined in the .bib. | f85273e1cbc0c697126b157fa1b5f1107e09b10a9a28f1e1b5d5fc89a6fcd453 | ['779eecc85b524d5d954d0a8718975243'] | la mejor forma para solucionar tu problema es utilizando bucles para recorrer las celdas y almacenarlas temporalmente en una variable String para escrbirlas nuevamente en formato tabla.
Podrías también trasponer los datos, pero no tendrás un control total como si lo manejaras de la forma anterior.
De igual forma lo normal para un manejo adecuado tendría que ser de la imagen b a la imagen a, ya que así tienes una matriz adecuada.
Cuéntame si pudiste resolver tu problema.
Saludos,
Nico
|
01be9bd8bc2139fa09b9b86e1b264a917a137b491901cd222c1b588a209ee736 | ['77b1fbc7326941378b2fe5dbab426381'] | The reason it isn't working is because the IIS handler is finding that the folder "ContactUs" exists and is responding to the request instead of handing off to the ASP.NET handler. (For e.g. if your actual physical folder was called 'ContactUs1' instead of 'ContactUs' and updated your route to point to '~/contactus1/contactus.aspx' you'd see your routing work).
The simplest solution in your case might be to set 'ContactUs.aspx' as the default document just for the 'ContactUs' subfolder. You can do this by adding a web.config to the ContactUs folder with the following XML section below.
<configuration>
<system.webServer>
<defaultDocument>
<files>
<add value="ContactUs.aspx" />
</files>
</defaultDocument>
</system.webServer>
</configuration>
| d35792e5695588a11fb753ccd545358f0c3bbf0fe5fb85b9481426da4b9273cb | ['77b1fbc7326941378b2fe5dbab426381'] | Could you attach the stack trace maybe? The "Oops" in the message makes me think that some code is catching the real error and returning a friendly error message. Try putting the breakpoint in there to get the stack trace.
If I had to take a wild guess, I'd say your code is trying to connect to the backend SQL Server database using integrated auth. In this is case your web application is connecting using the web server process account and failing. Try changing the connection string to use a valid SQL Server user name and password to see if the error goes away.
|
d082e1fda3d4dc5017b6209db289d0aa79d8b7be530dac2a7c89611717ed148c | ['77b4e8c27a6a4655a6d5fde4f46a3a43'] | I am new to Jquery, I am trying to use datatables with hidden rows. Below link is the same what I tried.
http://datatables.net/release-datatables/examples/server_side/row_details.html
Almost everything is working fine, data is displaying in the table, Search is working. But the table sorting is applying on next element and I am unable to open the hidden row.
When I click on 2nd column header, third column is sorting.
Below is Jquery function.
<script>
var oTable;
function fnFormatDetails ( nTr )
{
var aData = oTable.fnGetData( nTr );
var sOut = '<table cellpadding="5" cellspacing="0" border="0" style="padding- left:50px;">';
sOut += '<tr><td>Rendering engine:</td><td>'+aData[2]+' '+aData[5]+'</td></tr>';
sOut += '<tr><td>Link to source:</td><td>Could provide a link here</td></tr>';
sOut += '<tr><td>Extra info:</td><td>And any further details here (images etc)</td></tr>';
sOut += '</table>';
return sOut;
}
$(document).ready(function() {
oTable = $('#hosts').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "server_info.php",
"aoColumns": [
{ "sClass": "center", "bSortable": false },
null,
null,
null,
{ "sClass": "center", "bSortable": false },
{ "sClass": "center", "bSortable": false }
]
} );
$('#hosts tbody td img').live( 'click', function () {
var nTr = $(this).parents('tr')[0];
if ( oTable.fnIsOpen(nTr) )
{
/* This row is already open - close it */
this.src = "images/details_open.png";
oTable.fnClose( nTr );
}
else
{
/* Open this row */
this.src = "images/details_close.png";
oTable.fnOpen( nTr, fnFormatDetails(nTr), 'details' );
}
} );
} );
</script>
And below is the Json which server_info.php is giving.
{
"sEcho":0,
"iTotalRecords":"2",
"iTotalDisplayRecords":"2",
"aaData":[{
"0":"",
"1":"row1",
"2":"123456",
"3":"firewall",
"4":"1",
"5":"2014-02-05 06:11:25",
"extra":"hrmll"
},
{
"0":"",
"1":"row2",
"2":"567890",
"3":"Stand",
"4":"2",
"5":"2014-02-05 08:14:40",
"extra":"hrmll"
}]
}
Can anyone help with the issue?
| 0931caca451e1d445bcb756f2a165d0c69b0525b4882766a470ff386323b07e6 | ['77b4e8c27a6a4655a6d5fde4f46a3a43'] | Following html mail using mailx command is working from shell terminal, but the same command is not working from shell script.
mailx -s "$(echo -e "${sub} TRP OF ${system} \nContent-Type: text/html")" <EMAIL_ADDRESS> < TRP.html
I guess it is some small escape character error, but not sure what it is.
Can any one help here?
|
0b8abfe77e40ff88c0c225e4a0d9fd0d8ded43fa8f026fc52273913c0dc63406 | ['77ba5d6944ec42b2a86fcbaabd66f3a8'] | I found this very confusing until I placed the "AddHandler" in the main program (not the UserControl).
So for clarification, the steps to ensure that you can "sense" in the main program an event which has occurred in a user control is:
Make sure any object in your user control for which you wish to alter properties (such as PictureBox.Image or TextBox.Text) has its modifier property set to "Public".
This is the only way you can allow other programs to alter properties.
For events which your want recognised (e.g. "Click","DblClick" etc.) place at the top of your User Control code one declaration line for a Public Event. As an example,
Public Event UC_MySub(.....parameters.....)
"UC_" is a prefix I use to help highlight that it is defined in a "UserControl".
The rest of the name ("MySub") can be anything and does not need to relate to the Click Event in any way. You could even call it "CreamedCheese" if you want!
Include any parameters you like the the definition of the public event, again they can be any type of name. These will be passed to the main program when you click on the User Control's object.
Now, Going to the event which runs when you "click" on a GroupBox (in this case), you kick off that public event as shown here:
Private Sub GroupBox_Click(sender As Object, e As EventArgs) Handles GroupBox1.Click
RaiseEvent UC_MySub(....Paramaters.....)
End Sub
You have to ensure the parameters passed in this call to the public event are the same in number (and type) as each of the parameters defined in the Public Event declaration itself.
NOW, you rebuild your User Object, then go to your main program.
In the "Load" routine of your main Form, add the following line FOR EACH OBJECT of the user defined object you are using.
For example, in my program I have 4 instances of my UDO (User Defined Object).
So I have added (assuming my UDO is named "MyUDO"):
AddHandler MyUDO1.UC_MySub, AddressOf SwapHands 'This is my sub accepting the values from the public event
AddHandler MyUDO2.UC_MySub, AddressOf SwapHands
AddHandler MyUDO3.UC_MySub, AddressOf SwapHands
AddHandler MyUDO4.UC_MySub, AddressOf SwapHands
The "SwapHands" routine is defined in my main program and accepts the parameters stored in the UC Public event. The "AddressOf" points your resident subroutine.
The only thing to ensure across all these definitions is that you have the same number of parameters (if you have any) in each case, in the same order, and are of the same type).
(Each parameter can be a different type but must "line up" in types declared in each
definition). (e.g. 1 Boolean, 1 String, another string). In the definitions and calls, there have to be (in this case) 3 parameters of "Boolean, String, String" - in that order.
Now when you run the program and click on the GroupBox (or whatever you have used) in your UDO (User defined object) (on any one of the four objects in this case), you will kick off the routine stored in your main program.
Hard to explain, but after taking HOURS to fathom how this works, I thought I would leave my comments in case others are experiencing the same confusion.
| 8eb98376efe0faabf3c42abe5b56f2ae99345ccc0d5ef859eff7e885f3b095b1 | ['77ba5d6944ec42b2a86fcbaabd66f3a8'] | The IDE prompts for saving on unsaved code or resources when you close the project.
With GIT or other source control you can run on command to save versions.
I actually like the program "Second Copy" which you can set up to save versions of your code (I save the last 15 versions of any changed file in the project). This is set up to run whenever a file changes, but you would not want it to save a new version every time you make a change while testing/debugging, preferring to only back up to the new version every time the file is SAVED either manually using the mouse/Shortcut keys or upon close of the IDE. That way you have true backup of code you are satisfied with.
I think having autosave is dangerous because it overworks the source control if you have one in place (either GIT or Second Copy or whatever) and if you don't you lose the ability to go back to a prior version should you stuff up the code or decide not to proceed with changes. Having the option, though, to have autosave (either at intervals or on "Run"/"Build") should still be there to please all users (but the default should be "off")
Of course on "Publish" all files are saved anyway (as they should be).
Give "Second Copy" consideration...http://www.secondcopy.com/ (I have no association with second copy, I have just used it for years and love it)
|
be0b277316f9032ff6929f41177ca1b10b28c5d04092b6618a453f91db54bc5c | ['77bd5d5091ed405e8db8da3b0b71823a'] |
tittle is the root element, which will be found directly in $xml, so you can just use $xml->topic instead of $xml->tittle->topic.
You should loop over all elements in the array, regardless of how many there are, and not hardcode that in your PHP file.
The result would look something like this:
<?php
$xml = simplexml_load_file('xml.xml');
foreach ($xml->topic as $topic)
{
echo (string) $topic->name;
}
| e2e8a3c2e47956944521e594c9dab1d3ca8ead5eb818a592a473fa9b592296aa | ['77bd5d5091ed405e8db8da3b0b71823a'] | Since they use the same directory the only way you can do this is via a RewriteRule specifically for the main domain. Put this in a file called .htaccess in the root of your website.
Options +FollowSymLinks -MultiViews
RewriteEngine on
# If the request is for www.example.com ...
RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
# ... and the URL starts with files/images, deny access ([F] = Forbidden)
RewriteRule ^files/images - [F]
|
55a1d7477cfed5e8d46d470d7964245680f96e9437b0f24c188f974d11fb99ba | ['77c2f2ecf1d844f292af4b1f0996d6ec'] | Clicking on the sender or recipient name from within an e-mail header of the iOS Mail app opens the contact information page. This is extremely unfortunate because sometimes a contact can have several e-mail addresses associated with it. In these cases, it is impossible to determine the recipient/ sender e-mail address from within the iOS mail app.
The only fix for this issue is to use a different mail app which doesn't coddle its users in such helpful ways.
| 0b6b6135f96d4ad0815e2e5fefd6f3aa9df82d5affe6665fc1f620ce9628f78c | ['77c2f2ecf1d844f292af4b1f0996d6ec'] | Well, this is pretty much exactly what I did. As mentioned above, this works fine for me, when I only use 2 node points for approximating $y_1^2$ and $y_2^2$. But the problem does not solve any more, if I introduce more node points, attempting to approximate the parabolas better. |
c03eb61c405303edd0e90a6204c21fc197bc3d69a406298fd84db4530182b7b0 | ['77c978ec90124afea6c61eee158b6451'] | So if the child of a god and mortal is a demigod, and the children of demigods are called legacies (or demigods), then what would the child of a god and demigod be called? They would be three quarter god and only one quarter human so would they still be a demigod or something else?
| 25bb733e4f70ed5880f1f09f795baecd90b7779e954481ecaf23499c752c6b64 | ['77c978ec90124afea6c61eee158b6451'] | I have a dataset that I measured in 100 dimensions (i.e. each sample contains 100 values). I want to dimensionality reduce the data to 10 dimensions (i.e find a mapping where 10 values per sample can reconstruct the 100 values per sample). With PCA this is very simple; you remove the 90 smallest eigenvalues.
Now, lets say that for each sample, there is a linear transformation to a simpler set of 30 dimensions (lets call it QWERTY measuments) if you set values for some external parameters (the coefficients of the linear transformation changes when you change the external parameters - the equations to calculate the coefficents of the linear transformation from the external parameters are non-linear, however they are analytic and known exactly). If you apply regular linear PCA to these 30 dimensions, you can easily get dimensionality reduction to 5 dimensions with 98% of the variance explained.
What I want to do is dimensionality reduce the 100 dimension data set to 10 dimensions, only I want those 10 new dimensions to be able to reconstruct the 30 QWERTY measuments, whatever the external parameters are. In other words, I want 10 values per sample and the known coefficents of the linear transformation from the external parameters to be able to reconstruct the 30 dimension data with 98% of the variance explained.
What method can I use? All numbers were for illustration only, I just want to know the name of the method that solves this problem.
|
ce8ebd96df5ed320af3b9b036b9ca500a2f2fb73adb9a7c581699dc6a7bf9abc | ['77cd413f19bb42ae8de1c1a200191875'] | I am using $.getJSON to autocomplete control and everything is fine for chrome browser.
On IE, only plain text (without special characters like 'ż','ł' etc.) work fine.
Probbably it is cause by encoding but I don't know in which place I should do something. I tried to do this on controller which return JSON object, in javascript ($.ajaxSetup), on Layout (meta charset in head section) but result was the same.
Where I done mistake ?
| 74cca73d4d3297e5f48feabfe44315380c72399f75d8982a3e5dacaaf67219e9 | ['77cd413f19bb42ae8de1c1a200191875'] | Try to listing object in chrome (CTRL+SHIFT+I->Console). For example - get cy and y for every label in piechart legend.
var pieChart = paper.piechart(w, h, rad, values, {legend: legend, legendpos: "south", minPercent: 0.1, legendothers: "Others"});
for( var i = 0; i < pieChart.labels.length; i++ ) {
var CY=pieChart.labels[i][0][0].cy.animVal.value;
var Y=pieChart.labels[i][1][0].y.animVal[0].value;
}
|
01aaff3f12eb47612064aa3416b179f32fbac7d0ad5475017bbf2921f9683979 | ['77da71fd20854a70b24be878a821a27f'] | Found a way to do this that is
super quick and easy
doesn't require plugins or advanced plugin knowledge
actually generates a cleaner SVG export
Here's what you do:
Open your Sketch file and highlight everything you want to export
cmd + c (copy)
Open Adobe Illustrator, new file
cmd + v (paste)
Select All text, Type > Create Outlines
Switch back to Sketch
Sketch > Quit Sketch
| 409dcf00ca78120864fbae31ccf81da252d1ad9d6bf29b2ead15d7fc6fc76391 | ['77da71fd20854a70b24be878a821a27f'] | Is there a known best practice when referring to the authenticated user in an API URL?
For example, the Facebook API uses /me as a prefix to all the resources of the authenticated user.
But I can think of other solutions such as /my, /self or the long one /users/{id}.
Is it just a matter of preference/taste? or are there good reasons to choose one over another?
|
9e91394f678c28ddbd6c70322b6a350d52f381b92cb2dda0ba590a4d5d750bc5 | ['77e168a9687f428d906a4b9f3880db77'] | We are using a COM Object automation model to make our application available to our customers.
They are using for the most part python to access our applicaton interface.
As we want to be able to install (not yet run, that's another issue) different versions of the application, we are changing our COM components to be regfree.
But that conflicts with the access from scripting languages through IDispatch automation since they need the entries in the registry.
Our approach is to create an application which manages the active version of our actual application. It lets the user decide which version he wants to have and it takes care of the registry entries.
What are the alternatives to our approach?
| 4e22ba76c5fd88bea4a6f97ad6ecf286da8bc83979b2a25a8ee7a9d912a04c72 | ['77e168a9687f428d906a4b9f3880db77'] | Not likely that they'd last long enough to assimilate the new technology.
If we look at the last time there was a large disparity between weapons tech in a conventional war, it would probably be the 1990 Gulf war, when somewhat better than WW2 tech ran up against the latest and greatest. (and, yes, there are parallels to the current situation with N Korea, whose current army is even more antiquated today than Iraq of 1990, while western military tech has advanced considerably since then)
In short, it was no contest at all.
Not only would WW2 tech do poorly against modern tech, it is unlikely that a civilization based on WW2 tech could adapt to modern tech quickly enough to make any sort of difference. After all, the army you'd be trying to steal the tech from knows it a lot better than you do. It's not like you can capture a Sidewinder missile and start building reproductions over night, when you can't even build the simplest microchip.
A civilization whose military was based on WW2 tech would be well advised to consider an economic relationship rather than an adversarial one. Look up the current price of a Mustang, FW190, or a running Tiger tank today. If they're based on WW2 tech, they're already equipped to build those things.
Looking outside of the military market, they'd be ideally positioned to start turning out priceless 1930's classic cars like the Deusenberg SJ, Alfa Romeo 6C, Mercedes 540k...
Such a civilization could go into the functional reproduction business, and clean up.
|
dcf576b82847edeb52bf27b1a25eaef67c80530afd4d1ae726847b63f6cdc1e9 | ['77ef035b437e4a9885a08eb147459b75'] | <android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:minHeight="?attr/actionBarSize"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/AppTheme.PopupOverlay" />
use like this style and background because you use noaction bar for your activity. check up color primary and use darkness color more than white. style code which one you use in toolbar it could be like this code:
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
| 3c04b5f64452c077eeaf13c59831f54b5701564b2300f0a50100bd2b6ded7754 | ['77ef035b437e4a9885a08eb147459b75'] | I'm creating sqlite in application and I wanna use in today page but they have different file path. I can't reach my db that reason.
It gives me path like this ~/Application on application but when i try to reach for today page ~/PlugIns/.. it happens like this.
How could i reach my db both of page, How can i do that. Thank you.
|
c1dfa6accad8102a9a32d4ce411673e307cdc08cd249e8cc7a1dbc652ae0a452 | ['7809e09dfdd44866b7f9ebeff596fc59'] |
Suppose that a function $f$ is analytic in the open disk
$$D_{r}=\{z\in \mathbb{C}:|z|<r\}$$
where $r>0$, and there is a number $M\in\mathbb{R} $ such that $|f(z)| \leq M$ for all $z \in D_{r}$.
Let $\delta \in (0, r)$. Then show that:
$$|f^{n}(z)|\leq \frac{n!M}{\delta^{n}}$$
for all $z\in D_{r−δ}$ where $D_{r−δ} = \{z\in\mathbb{C} : |z| < r − δ\}$.
My try:
The initial disk $D_{r}$ is centered at $z_{0}=0$, the Cauchy formula reduces to
$$|f^{n}(z)|=\frac{n!}{2\pi i}\int_{D_{r}} \frac{f(\zeta)}{(\zeta-z_{0})^{n+1}} d\zeta$$
$$=\frac{n!}{2\pi i}\int_{D_{r}} \frac{f(\zeta)}{\zeta^{n+1}} d\zeta$$
$$\leq \frac{n!}{2\pi }\frac{M}{\delta^{n+1}}2\pi \delta=\frac{n!M}{\delta^{n}}$$
and then extending this theorem, the new disk $D_{r-\delta}$ is still centered at $z_{0}=0$ and the radius is still $R=\delta$. So, you can show that the inequality is true for the new disk by replacing $M=M_{1}$ and show that $M= M_{1}$ equal each other. This doesn't seem like a very complete evaluation of the problem in hand.
| cf6b3e712dc60f2298aba2fedee6d720ec98e7eefbb706ef0ede539aff1491e8 | ['7809e09dfdd44866b7f9ebeff596fc59'] | I want to create an VMFS partition on a disk using GPT. I know using esxi cli we can create it easily using partedUtil with command
partedUtil setptbl /dev/disks/t10.ATA_____SAMSUNG_MZ7LM480HMHQ2D00005 gpt "3 1547328 937703040 AA31E02A400F11DB9590000C2911D1B8 0"
but I need to create it using a rescue disk. I tried fdisk but VMFS partition type (AA31E02A400F11DB9590000C2911D1B8) is unavailable. Which tool can I use in a standard linux distribution to create VMFS partition?
Thank you
|
d791e38a0e1ec2e543f59a274750857351a52e2cf8ff96148777c64e2d28875e | ['7822baa08387451e957f235293f45378'] | I have a MVC application and I have to logout. To logout from the application I have created a link on te master page
[ <a id="A2" name="lnkLogout" href="http://localhost:1234/Home/LogOut" >Logout</a> ]
and created the LoutOut action in the controller page
public ActionResult LogOut()
{
Session.Clear();
Session.Abandon();
Redirect("http://AnotherApplicaton/Home/LogOut");
}
Now when I click on the LogOut link its redirect to the LogOut action and in the LogOut action its delete all the session, but when I click on the back button of the browser its get back to the previous page and sessions are still alive. Does anyone have the solution of this problem.
| 9a58781ae6270f37dafb95a0ad04f1bd31995820a17ca889a9b30b79e52d3145 | ['7822baa08387451e957f235293f45378'] | I'm doing a simple budget app, to make some calculations to improve private economy.
I've made an option where you can enter the value of the money that are in the bank right now, and how many days there are left in the month. Now it calculates the daily average. Fx if I enter 6400 at my account, and 18 days left, i will get that i can spend 355,55 pr day for the rest of the month. Simple division. So far so good.
But now i want to make an algorithm that can calculate, how much I can spend in x days, to improve the daily average for the rest of the month.
So I can enter some values:
M: How much there are on my account today (fx. 6400)
D: How many days there are left in the month (fx. 18) (here I will get the average of 355,55)
V: How much I will spend pr. day in x days, to improve the average (fx. 300).
A: How much I want to improve my average to, for the rest of the month (fx. 400).
If I have an average at 355,55 pr day for the rest of the 18 days in the month, how can I calculate how many days I would have to spend only 300 pr day, to get my average up to 400 pr day, for the remaining days of the month?
What kind of formula would I be using?
Thanks so much.
|
a22c10e4b3d3d33fa391df562b085bc0a25be1cc1a63c2ed6c864750164a6a03 | ['782c616ee5564bb38e054358a9b5c090'] | I wonder if it is possible to produce a string of repeated colors of user-defined length to further apply it as platteles to the figure?
Let's say i want to use these colors
colors <- c("#A7A7A7",
"dodgerblue",
"firebrick",
"forestgreen",
"gold")
Do i need to use for loop to produce colors of length let's say 100?
Thank you for any tips.
| fcd46c11ba94fb7ab5d4a7cfd14810d6a38324165893a8f0f961c94f6c5f08bf | ['782c616ee5564bb38e054358a9b5c090'] | This is my sample data frame
DF
x.a.p y.b.l x.a.pl y.b.c z.d.ce
Those are numeric columns. How can i exclude from DF columns which names end with .p and .l
I tried to find these columns with grep and then subset but it didn't work.
Thank you for any assistance.
|
6a87cd247965c9e67a6b35978acde79207023566b2c7e45adda8fe98fd58ac28 | ['784ab8a4a87746a995addab3fc3121ad'] | With hours of research, I still can't figure out a way to convert this pip install cmd to pyproject.toml
file. I'm trying to install PyTorch.
pip install torch==1.7.0+cpu torchvision==0.8.1+cpu torchaudio===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html
This is what I got at the moment (Completely Wrong!)
[tool.poetry]
name = "poetry-test"
version = "0.1.0"
description = ""
authors = ["Your Name <<EMAIL_ADDRESS>>"]
[tool.poetry.dependencies]
python = "^3.8"
torch = "^1.7.0"
torchvision = "^0.8.1"
torchaudio = "^0.7.0"
[tool.poetry.dependencies.torch]
url = "https://download.pytorch.org/whl/torch_stable.html"
[tool.poetry.dev-dependencies]
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
| ecd550e6fab4e27af1bbbad3106fd03dc56db06d7bfbf9ee4dedab7aba9a889c | ['784ab8a4a87746a995addab3fc3121ad'] | How to generate a list of tokens that are most likely to occupy the place of a missing token in a given sentence?
I've found this StackOverflow answer, however, this only generates a possible word, and not a list of words that fits the sentence. I tried printing out every variable to see if he might have generated all the possible words, but no luck.
For example,
>>> sentence = '<PERSON> is a Portuguese professional [].' # [] is missing word
>>> generate(sentence)
['soccer', 'basketball', 'tennis', 'rugby']
|
357a4e61a92ed64dc4b6abac57aeb2917465d7ff8d7cbfe60ecb77517f4f21ec | ['78539f2385124ed19a84b2ff7c441682'] | Solved it! The solution is:
UPDATE A
SET A.[ANDRAT_Vkod] = (case when B.[ANDRAT_Vkod] = 'A' then 'AG' else A.[ANDRAT_Vkod] end),
A.[ANDRAT_timlon] = (case when B.[ANDRAT_timlon] = 'A' then 'AG' else A.[ANDRAT_timlon] end)
FROM [dbo].[andrat_APP_GENKORR] A
LEFT JOIN [dbo].[andrat_appen]) B
ON A.EnhetsId = B.EnhetsId AND A.pnr = B.pnr AND A.Etikett = B.Etikett
| e7eba54d6936c719e1677ccc8c02c5de4071c424b752ce0dfb29d1cfeb7949d2 | ['78539f2385124ed19a84b2ff7c441682'] | The code below generates around 300 rows, but only a small fraction of them has any value in column "Unit=3". The rest have null values, and hence many duplicate values in column "ekod" exists.
Does anyone know how to remove all rows with a null value in the column "unit=3"?
Best regards!
Result:
ekod unit=3
0004 NULL
0114 15
0114 NULL
0114 NULL
0120 NULL
0120 NULL
0120 46
0120 NULL
Code:
select
A.ekod
,case when A.unit='3' then count(*) end AS [Unit=3]
from [Stat_unitdata].[dbo].[XXX_YYY] A
group by a.ekod, a.unit
order by ekod
|
57a23ca9efef209172e877833fccd9267357caaa90acb5f3631671b7bd75d742 | ['785838065d9a45a999a8d7be29150d82'] | Look at the following extremely simple Python code:
x = 3
print(x)
Is assignment in python same as the concept of pointers in C language — like in the above case, x is a pointer to an object of type int — (Correct me if I am wrong)? Does that object only contain the value 3 or it contains some other things as well? Is it completely different from that? Please explain in detail.
| 22f3663f4947c4fe28b1be314e4eb54cabf8d21ec8b375c215a984810c72e66d | ['785838065d9a45a999a8d7be29150d82'] | #foo.py
import bar
print(__name__)
#bar.py
import foo
print(__name__)
When foo.py was run, the output was as follows:
bar
foo
__main__
print(__name__) in foo.py is executed twice and produces two different outputs. So are two different modules of foo.py created to store the information of the __name__ variable, which is different in both cases?
|
1644e04b3a419c4e13e8bf4f52ed6e3acc0707e92ee979f8ed8a3262c9ca3b94 | ['7874c69d1153428cb61d5e91e83cf62f'] | I am monitoring Significant Location Changes (SLC) even when the app is not in the foreground. It is working as expected and the app is woken up even when it is not running to handle the SLC. However, I would like to understand better how relaunching the app actually happens, name I would like to know what happens in the following scenario:
The app is not running
SLC happens and the app is relaunched. According to the docs: "At
wake-up time, the app is put into the background and you are given a
small amount of time (around 10 seconds) to manually restart
location services and process the location data." Evrything is OK.
While step 2 happens (i.e. within the time frame the app is running
in the background) the user launches the app manually.
What happens in this case?
Will the app simply brought in the foreground?
Will a new instance be launched and
application:didFinishLaunchingWithOptions: called without
launchOptions?
Will the backgrounded app instance be terminated and a new instance
be launched without launchOptions?
Something else?
Thanks for helping me understand this in advance.
| 12e1ff51c1be0d29206e438e733f44d9de2c0f9f5d63e2340b324a3f48afd795 | ['7874c69d1153428cb61d5e91e83cf62f'] | I have a tree of NSProgress objects to monitor data processing which involves downloading files. Downloading is done using NSURLSession with background configuration.
When I start the process, the topmost NSProgress object reports unexpected fractionCompleted figures. Having debugged the issue (and isolating it into a "Hello World" application),
I found that an NSProgress object is created as a result of calling [NSURLSession downloadTaskWithRequest:] and its fractionCompleted property is 1.0 right after calling the above method.
Since this NSProgress object gets part of my NSProgress tree, if offsets the progress figures above it in the tree.
In this sample application, I am also starting a dummy background task parallel with the download, which reports progress through an NSProgress object.
The reason why I did so is that provided that NSURLSession does not create any NSProgress objects (, which is what Apple claims) there will still be at least one down in the NSProgress tree.
Having logged the NSProgress tree right after launching the download and the dummy task here is what the NSProgress tree looks like:
<NSProgress: 0x7ff8dae06b10> : Parent: 0x0 / Fraction completed: 0.5000 / Completed: 0 of 1
<_NSProgressGroup: 0x7ff8dae0f450> : Portion of parent: 1 Children: 1
<NSProgress: 0x7ff8dae0f880> : Parent: 0x7ff8dae06b10 / Fraction completed: 0.5000 / Completed: 0 of 100
<_NSProgressGroup: 0x7ff8dae0fec0> : Portion of parent: 100 Children: 2
<NSProgress: 0x7ff8dad74b90> : Parent: 0x7ff8dae0f880 / Fraction completed: 1.0000 / Completed: 1 of 1
<NSProgress: 0x7ff8daf036c0> : Parent: 0x7ff8dae0f880 / Fraction completed: 0.0000 / Completed: 0 of 100
As a result, progress reporting gets weird.
If I comment out the call to start the download ([self resumeDownload]) then the NSProgress tree looks like:
<NSProgress: 0x7febca52ac90> : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of 1
<_NSProgressGroup: 0x7febca529e60> : Portion of parent: 1 Children: 1
<NSProgress: 0x7febca529ff0> : Parent: 0x7febca52ac90 / Fraction completed: 0.0000 / Completed: 0 of 100
<_NSProgressGroup: 0x7febca52ced0> : Portion of parent: 100 Children: 1
<NSProgress: 0x7febca52d780> : Parent: 0x7febca529ff0 / Fraction completed: 0.0000 / Completed: 0 of 100
As you can see there is no extra NSProgress object with fractionCompleted = 1.0 and the progress reporting is OK.
Now I do not see where that NSProgress with fractionCompleted = 1.0 is coming from if it is not from NSURLSession or something underneath. (Apple stated that NSURLSession does not create NSProgress objects.)
I cannot see this behaviour on iOS 7 only on iOS 8 (even with the GM release).
Please note that I am using NSURLSession with background configuration! With default configuration the issue is not present.
Why does that "unexpected" NSProgress object appear with fractionCompleted = 1.0?
Am I using the NSProgress API wrong?
What's causing the very different behaviour on iOS 7 and 8?
The sample code is available here: https://s3-eu-west-1.amazonaws.com/pg.test/pubtest/NSProgress-20140830.zip
Thank for any help in advance.
|
5bc4bbce06f194b3c6d0b12066d60a9f454ffeb3be4c0fc2f97c345a0e457a01 | ['7879f3c6cd6e4ce1b998848fde139257'] | i have 2 different and indipendent dbcontexts and i want to create the db schema (using npgsql/posgresql) with code first migration.
i put in 2 different folder the configurations (with AutomaticMigrationsEnabled set to false) and the 2 initial migration files (once for every dbcontext) using the Add-Migration command line tool.
then i use the command line Update-Database with the first configuration and it works, the db is correctly created with the tables related to the first context.
But when i try to use Update-Database with the other configuration i get an exception because it is trying to create the table __MigrationHistory that already exists.
what's wrong in my code?
| 880aa7a64fbfa6df092e2395fd455d0c83a65caee3ac5c182e34119d55a7ce99 | ['7879f3c6cd6e4ce1b998848fde139257'] | Actually there is overlap between frequency responses of the hair cells, but as you write, there are many of them and the bands are nevertheless relatively narrow in comparison to hearing frequency range. The overlap improves pitch recognition, at least for trained musicians. <PERSON> yes, there is position data: most of us have two ears, and the brain can do quite amazing things with them. Obviously though, two is much less than millions of cones in the eyes. |
b76ffe2a94484e8c34baa8cfdc232dacce550b8b35b97ff02278c2d47c72e050 | ['7884592996844ac08e8a09d88aac2411'] | Example Array :
Array
(
[0] => Array
(
[campain] => exaple1
[subject] => subject1
[count] => 1
)
[1] => Array
(
[campain] => exaple2
[subject] => subject2
)
[2] => Array
(
[campain] => exaple3
[subject] => subject3
)
[3] => Array
(
[campain] => exaple1
[subject] => subject1
)
[4] => Array
(
[campain] => exaple2
[subject] => subject2
)
[5] => Array
(
[campain] => exaple1
[subject] => subject1
)
)
Expected Result :
Array
(
[0] => Array
(
[campain] => exaple1
[subject] => subject1
[count] => 3
)
[1] => Array
(
[campain] => exaple2
[subject] => subject2
[count] => 2
)
[2] => Array
(
[campain] => exaple3
[subject] => subject3
[count] => 1
)
)
Need Distinct campain,subject & campain count. Subject value can be neglected(i mean no need to take distict subject values as its value will not change for a campain).
| 8a22134770a78c2b85a3df838024d4c69221b11b38e0558cee37648deba7f15f | ['7884592996844ac08e8a09d88aac2411'] | Below code works if you have only one p tag in your string.
var str = `<h1>Headline do not touch me, nor the line break</h1>
<p>
This is
a test string, please
put me on one line.
</p>`;
var str = str.substring(0, str.indexOf('<p>')) + str.slice(str.indexOf('<p>'), str.indexOf('</p>')).replace(/(\r\n|[\r\n])/g,' ') + str.substring(str.indexOf('</p>'), str.length);
|
a3c035ea5f6dc88cd4b029ff85a27b3186ce40efbe45d9f7dca0268f9bd62c7b | ['7885b3642e2e41a5a4931bf744b77863'] | I am building a calendar control. It generally works well and is responsive, despite using hundreds of UIViews (each cell in the example image is a UIView).
http://i.stack.imgur.com/6g1hQ.png
I have run into a problem in which the calendar is put in an app. It is fully obscured by some other controls and finally by a Quick Look viewcontroller. When the Quick Look is dismissed it takes a long time (10 seconds) before the app appears to respond.
Any view other than Quick Look has no slowness symptoms
Any help would be appreciated.
| 082585f807a8919e5650667bfd3ac1d5551022014bca56d2fcf27ee14ab542ab | ['7885b3642e2e41a5a4931bf744b77863'] | The problem was Autolayout. It simply cannot handle more than a trial number of views. Each nested view impacts the rendering time exponentially.
I end up writing my own "MagicLayout" system that does the same job, but it takes about 500 ms instead of 10000ms. The amount of time to dismiss a ViewController went from 10 seconds to about 10ms
Coming soon to a Xamarin component store near you.
|
71d67c825383754140ce358c2d847368fb43731afbb2b9341747452c592aa904 | ['78867c1e5ff04795b9838b65900b209f'] | 1. Yes
2. This was just a speculation on my side.
Searching for Washington yields results, if I click on details I receive correct information but searching for the city centres coordinates returns a different place. This also isn't universal with all searches, some cites like Berlin work properly but Munich for example doesn't, the latter has other towns close to it that seem to interfere with the GPS lookup | a8138d5fa8c904660979b982eb6e358359b32af03e7b5b056d5f51604ee3b658 | ['78867c1e5ff04795b9838b65900b209f'] | Estoy construyendo un prototipo de agenda para guardar datos y citas. Debo estar cometiendo algún error tonto que no logro ver. Al crear una instancia me da error. Os dejo parte del código a ver si podéis ver que ocasiona el NullPointerException.
public class Agenda {
String nombreAgenda;
List<Cita> listaCitas;
Set<DayOfWeek> diasNoHabiles;
Map<String, IntervaloFechas> mapaPeriodos;
final int MAX_CITAS_DIA;
public Agenda(String nombreAgenda, int MAX_CITAS_DIA, Set<DayOfWeek> diasNoHabiles,
Map<String, IntervaloFechas> mapaPeriodos) {
}
public static Agenda buildSampleAgenda() {
Cliente[] clientes;
Cita c1;
Agenda sample = new Agenda("SAMPLE", 10, noHabiles, noLaborables);
clientes = Persona.buildSamplePersonas();
c1 = new Cita(clientes[0], LocalDateTime.parse("2019-02-19T20:00:00"), "Arreglar frigorífico.");
sample.listaCitas.add(c1);
return sample;
}
}
He omitido parte del código, pero en conclusión es que tengo un método constructor y otro estático que me construye la Agenda.
Recalco que todo me funciona correctamente y se crea la instancia, hasta que intento agregar un elemento a la lista:
sample.listaCitas.add(c1);
Si hago:
public static void main(String[] args) {
Agenda nueva = Agenda.buildSampleAgenda();
}
me marca NullPointerException en la línea de añadir a la lista...
A ver como podría subsanar el error.
Gracias, un saludo a la comunidad.
|
6e1216ec635f3c46af42bbf6b32f203f0b32f7a2ae91884a54111d59e5a66e71 | ['788c2a0a1b9848f89185a69face0aeb0'] | We have 2 kubernetes clusters hosted on different data centers and we're deploying the applications to both these clusters. We have an external load balancer which is outside the clusters but the the load balancer only accepts static IPs. We don't have control over the clusters and we can't provision a static IP. How can we go about this?
We've also tried kong as an api gateway. We were able to create an upstream with targets as load balanced application endpoints and providing different weights but this doesn't give us active/passive or active/failover. Is there a way we can configure kong/nginx upstream to achieve this?
| 4d6f4937f08027da0db03af21fcd5eadf26075a63a398220f3bf06519feeba1f | ['788c2a0a1b9848f89185a69face0aeb0'] | I have a spring-boot application running on a container. One of the APIs is a file upload API and every time a file is uploaded it has to be scanned for viruses. We have uvscan to scan the uploaded file. I'm looking at adding uvscan to the base image but the virus definitions need to be updated on a daily basis. I've created a script to update the virus definitions. The simplest way currently is to run a cron inside the container which invokes the script. Is there any other alternative to do this? Can the uvscan utility be isolated from the app pod and invoked from the application?
|
206fa21b1c72e951a0bf03b86be06646f30375cb8d177165002df3de5c581ba5 | ['788ec07390c1474f8f4f225368b005e6'] | Started again from scratch, manually uninstalled everything.
Following this:
https://www.stuartellis.name/articles/windows-golang-setup/
I just used scoop to create a default install of all the apps; I knew I wouldn't like the result because it put them all on my C:\users\ which is only for my OS
Then I ran buffalo new coke which failed with an error message along the lines of 'you need to be inside GOPATH'
Then I ran buffalo info which gave me all sorts of useful stuff, one of which told me that my PATH needed to match where I was running it from (which I thought was quite clever of it), then light dawned, my path was e:\dev\go and I was running it from E:\dev\go\src. Yes, a capitalization issue. Changed my path to 'E:\dev\go', reran buffalo info and only got warnings about things I wasn't interested in, ran buffalo new coke and it worked.
Now I'm uninstalling scoop and all my scooped apps, changing my custom path using SCOOP and SCOOP_GLOBAL and then re-installing scoop and all the apps again via scoop.
So, capitalization.
| 0ed69851da96b89bd64639ba3331b2a948376750c305e8e18c581fce24a59ef7 | ['788ec07390c1474f8f4f225368b005e6'] | I'm new to Erlang and am trying to parse an XML document into a record. I have tried various methods (xmerl_scan/xpath) but get painted into a corner because I don't know enough to know where to begin.
I've plodded through three books on the subject and spent a few hours googling the subject matter but I think I must be missing something obvious.
There must be a simple way to visit each node using some sort of pattern matching and generate a list of matches.
This is the input...
<Sports>
<Sport> SportId="1" SportName="Cricket">
<League LeagueId="1" LeagueName="Test Match">
<Meeting MeetingId="1" MeetingName="Test Match"/>
</League>
<League LeagueId="2" LeagueName="One Day International">
<Meeting MeetingId="1" MeetingName="One Day International Match""/>
<Meeting MeetingId="2" MeetingName="One Day International Series"/>
</League>
<League LeagueId="3" LeagueName="T20 World Cup">
<Meeting MeetingId="1" MeetingName="T20 World Cup Futures"/>
</League>
</Sport>
<Sport SportId="7" SportName="Golf">
<League LeagueId="1" LeagueName="PGA Tour">
<Meeting MeetingId="1" MeetingName="St Jude Classic"/>
<Meeting MeetingId="2" MeetingName="US Open"/>
</League>
<League LeagueId="22" LeagueName="European Tour">
<Meeting MeetingId="100" MeetingName="Nordea Masters"/>
<Meeting MeetingId="101" MeetingName="Nordea Masters Tournament HH"/>
<Meeting MeetingId="102" MeetingName="Nordea Masters Top Aussie"/>
<Meeting MeetingId="107" MeetingName="Nordea Masters Handicap"/>
<Meeting MeetingId="110" MeetingName="Nordea Masters R1 3 Balls"/>
</League>
<League LeagueId="34" LeagueName="Ryder Cup">
<Meeting MeetingId="1" MeetingName="Ryder Cup 2012"/>
</League>
</Sport>
</Sports>
and this is the desired output...
[{SportId,SportName,LeagueId,LeagueName,MeetingId,MeetingName}]
Don't necessarily need a canned answer but just a push in the right direction would be useful so I can do some further research myself.
I've used mochiweb_html:parse to search for a specific information in a particular node but in the above instance I need to extract information from multiple nodes.
thanks
|
863131778476d0c0659d23571c432a56ba66bed96cd7597f1d98ab8e34a271df | ['78beb005c03f4034812126c55930df86'] | Apart from mentioned in all answers I have to add the below code in pom.xml configuration to makes mvn clean install work. Before adding this code I was getting cannot found symbol for getters and setters.
<annotationProcessorPath>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.8</version>
</annotationProcessorPath>
| 63ef31f6b740483bf11a7b3b7bf408fa60f64c615c17900fb8a9629fafec902d | ['78beb005c03f4034812126c55930df86'] | Answering my own question , I was missing Response body format later I come to know after going thru documentation at https://platform.ifttt.com/docs/api_reference
Response body format
Provide response bodies as JSON objects. Success responses have a top-level wrapper object called data.
Raw body on success
{
"data": {
// The value of data varies, but is typically
// either an object or array
...
}
}
|
2e0545b097e9f0332a66c9b6af2ef56c9daaf1bed73741162d15d405f293f3f9 | ['78df85a68db7432cbdb4c1ce0e5c9436'] | I observed similar behaviour as well. Even if the GUI shows that PSMODULEPATH is ok, running processes (like explorer.exe) do not automatically pick up changes to the environment. Usually Log-Off/-On or a reboot helps.
Background:
When a process starts, the current environment is copied "into" the process. If a process starts another process, like if you start a program using Windows Explorer, the new child process gets a copy of the parent processes environment. Changes to the user or system environment variables are therefore not picked up by running processes unless the process explicitly listens to WM_SETTINGSCHANGED window message and reacts accordingly. From my experience not many processes do this correctly.
| 9bff974e06dcca046b61888a5c74f030e7aeaf89030ff5c864acd2ebe503226a | ['78df85a68db7432cbdb4c1ce0e5c9436'] | NO.
You should learn tactics before playing tactical openings as they are far more subtle and somewhat mixed with positional play.
You should study tactics separately and methodically not just solving random tactical problems.
You need to do at least ten similar tactics problems after seeing an example of how it works. This will implant the pattern into your memory for use in a real game.
|
02ae02ab42c711d7cc53af7d5f759edaed71e0a2d0cb6d4ca81dba09060ae044 | ['78ea76b527d44e18829bad07f52ccdf5'] | I would like to update "Last_x0020_Modified" in the SharePoint documentation.
I am unable to update with the error.
"Invalid data is being used to update the list item. The field you are trying to update may be read-only."
Is there a way to update "Last_x0020_Modified"?
using (var context = new ClientContext("URL"))
{
var passWord = new SecureString();
foreach (char c in "pass".ToCharArray())
{
passWord.AppendChar(c);
}
context.Credentials = new SharePointOnlineCredentials("account", passWord);
var documents = context.Web.Lists.GetByTitle("Document");
documents.Fields.GetByInternalNameOrTitle("Last_x0020_Modified").ReadOnlyField = false;
documents.Update();
context.ExecuteQuery();
var query = CamlQuery.CreateAllItemsQuery();
var collListItem = documents.GetItems(query);
context.Load(collListItem,
items => items.Include(
item => item.Id,
item => item.DisplayName,
item => item.ContentType,
item => item["Modified"],
item => item["Last_x0020_Modified"]
));
context.ExecuteQuery();
foreach (var listItem in collListItem.Where(item => item.ContentType.Name == "folder"))
{
listItem["Last_x0020_Modified"] = "2020/09/01T09:00:00";
}
context.ExecuteQuery();
documents.Fields.GetByInternalNameOrTitle("Last_x0020_Modified").ReadOnlyField = true;
documents.Update();
context.ExecuteQuery();
}
Best Regard.
| 9281063c6a85a77b95d43f6c15c4992fefd0e41df13d43133e35e3e2412d0b97 | ['78ea76b527d44e18829bad07f52ccdf5'] | In the table plugin of tinymce, width and height etc
I would like to do the default units at points instead of pixels.
I tried to replace "px" part in plugin.js with "pt"
Recalculation done when dragging the table width etc.,
It seemed impossible to simply replace it.
Is there any good plan?
best regard.
|
225b56afd40ed403a5ccd068fa1ff1ec992a231eae55d908a4bc9356b1212423 | ['790ba8608b234f05b297a2e1471997f1'] | I have 3 tables that bring information about freight, with the following structure bellow.
My problem is that it seeks equal values between 2 tables, but does not compare with 3.
Join is comparing the same data between
public function listarOcorrencia($pedido) {
$this->db->select("t2.data, t3.situacao, t3.legenda, t3.cod_transportadora");
$this->db->join('table3 t3', 't3.de = t2.ocorrencia');//return this
$this->db->join('table1 t1', 't1.nome = t3.cod_transportadora');//and this separeted
$this->db->from('table2 t2');//ok
$this->db->where('t2.pedido_id', $pedido);//ok
$this->db->order_by('t2.data', 'asc');
$query = $this->db->get();
return $query->result();
}
| 53f89f6f697e820379f0b5c95c808665f353355605ce180e8319b9b2b13b0f29 | ['790ba8608b234f05b297a2e1471997f1'] | I have an e-commerce with Codeigniter + MySQL, and in my cart I need to check if a customer already is registered in my ERP, that use Firebird, if exist use CODCLI from Firebird, else $data["customer_id"].
I'm using this code bellow, but have 5 sec of delay (this is made to test but I don't know how improve it and use inner a Model (connected in Firebird DB)
//Verify if customer already exist in ERP
if ($erp_consulta["tipo"] == 'f') {
$conexao = ibase_connect("127.0.0.1:C:/DB.FDB","SYSDBA","masterkey");
$erp_codcliverif = "SELECT count(CODCLI) FROM CUSTOMERS_001 WHERE CNPJ = '$erp_cpf'"; // <PERSON><IP_ADDRESS>:C:/DB.FDB","SYSDBA","masterkey");
$erp_codcliverif = "SELECT count(CODCLI) FROM CUSTOMERS_001 WHERE CNPJ = '$erp_cpf'"; // vai sair
$consult_cliverif = ibase_query($conexao, $erp_codcliverif);
if ($consult_cliverif != 0){
$erp_codclisql = "SELECT CODCLI FROM CUSTOMERS_001 WHERE CNPJ = '$erp_cpf'";
$consult_cli = ibase_query($conexao, $erp_codclisql); //vai sair
while ($row = ibase_fetch_row($consult_cli))
{
foreach($row as $key => $valuecli)
{}
}
}
else{
$valuecli = $data["customer_id"];
}
}
|
43f7cb4df6a7a17d5f6f210d0a6a514bbcf86f560c59274a3b7a18665fb2b5c9 | ['7912df796c0143c4be8dce4eda5a8be8'] | I've recently started playing with Node.js and I've been trying to create a basic blog (using Express, MongoDB and Mongoose) where I can create, edit and delete posts. I've managed to get everything working except the edit. Here's an example of the routes to create a post so you can see my approach. I've written it using CoffeeScript. If this is a problem I can compile and edit the post.
# [get] new post
app.get "/posts/new", ensureAuthenticated, (req, res) ->
res.render "posts/new",
title: "New Post"
user: req.user
# [post] new post
app.post "/posts", (req, res) ->
post = new Post(req.body.post)
post.save (err) ->
unless err
res.redirect '/posts'
else
res.redirect '/posts/new'
The problem I'm having is when I'm trying to edit/save a post (document). I'm not seeing any errors yet the document in the database isn't updating. I'm using the PUT request as I read that it's converted by Express. My edit routes are as follows:
# [get] edit post
app.get "/posts/:id/edit", (req, res) ->
Post.findById req.params.id, (err, doc) ->
res.render 'posts/edit',
title: 'Edit Post View'
post: doc
# [put] edit post
app.put "/posts/:id", (req, res) ->
Post.findById req.params.id, (err, doc) ->
doc.post = req.body.post.content
doc.save (err) ->
unless err
res.redirect '/posts'
console.log 'edit success'
else
console.log 'edit failed'
Here is the form from the edit post template:
form(method='post', action='/posts/' + post.id)
input(name='_method', value='PUT', type='hidden')
fieldset
legend Editing post
div.clearfix
label Post
div.input
input(name='post[content]', class='xlarge', value="#{post.content}")
div.actions
input(type='submit', value='Save', class='btn primary')
button(type='reset', class='btn') Reset
Can anyone help me with this problem? I've followed a tutorial in a book and this is what's done yet it doesn't seem to be working for me. If I saw some errors it would be a start but as I'm extremely new to Node.js (and JavaScript, really) I don't know where to look now.
Thanks for your time, it's much appreciated!
| 6104a8ed4799063b61ab35e2e91ec97f8076b7a6fc2bead27f51a9dcd58d06ff | ['7912df796c0143c4be8dce4eda5a8be8'] | As mentioned above, you can use that but just be aware that the last-child CSS pseudo-class isn't supported in any IE browsers below IE9. I don't know what you plan on supporting but it's worth knowing. The first-child pseudo-class, however, has some support in earlier versions of IE.
|
2f13cf60f673a8ab48ab96db9de2d160899ec7d12653e4dc1d6ee05f1d21d57e | ['7916bdca5ba7472a80c6402440154d29'] | You don't neet to realloc, but you will have to malloc twice. This is an exemple splitting in position 5 of a array of chars of size 10.
char * array = malloc (sizeof(char) * 10);
memcpy (array, data, sizeof(char) * 10);
char * split_part_1 = array;
size_t split_part_1_len = 5;
char * split_part_2 = malloc (sizeof(char) * (10 - 5));
memove (split_part_2, array + 5, sizeof(char) * 5);
size_t split_part_2_len = 5;
Use the arrays, now to free:
free (split_part_1);
free (split_part_2);
| 75d628377951e0c79767313ba022794e2f2e7c112c568ccb2844a7bb31204a77 | ['7916bdca5ba7472a80c6402440154d29'] | The memory is allocated in multiples of blocks (st_blocks). The remaining bytes you noticed are due to block alignment.
If you check the value of st.st_blocks you will see that it is a good divisor for 644, while not to 606.
So, if you want to know the real size occupied with data, do not use st_size.
|
e34e07dc82c881748c35c941583e0caca5c506da61f04be8223ed9c059228be8 | ['791ae5606b36458c8196629916aa1929'] | I'm currently working on my website hosted on GAE.
It has not been update since a while, so now, I'm trying to made a refresh of it :D
To do the trick, I try to use the MVC model using Python and WSGI, WebAPP2 and Render.Template.
Everything goes right, except for the CSS part.
Indeed, I can't render some part of my CSS using the GAE (django) method.
My Python controller is calling the HTML file and replace the variables by the dict() values correctly.
But now, and to be able to only have restricted amount of CSS file, I'm trying to do the same thing.
Unfortunatly I don't know how I'm suppose to call the CSS File.
I'm currently calling my CSS on my HTML as usual:
<link rel="stylesheet" media="screen" type="text/css" href="/assets/css/struct/index.css">
And trying to dynamically render this part of the file:
header#navigation{
height:auto;
min-height:480px;
width:100%;
min-width:100%;
background-image:url('/assets/img/content/{{content_cat_name}}/cat_img.jpg');
background-repeat:no-repeat;
background-position: left top;
background-size:contain;
background-color:#efefef;
}
and everything is then call by my python code like this:
class URIHandler(webapp2.RequestHandler):
def get(self, subdomain, page):
name = subdomain
pattern = os.path.join(os.path.dirname(__file__), '../views' ,'index.html')
template_values = {
'content_cat_name':name,
'cat_menu_title':name,
'cat_menu_text':name,
}
self.response.out.write(template.render(pattern, template_values))
So, if someone could help me to correctly call my CSS and replace the variables using my python script, I'll be really happy :D
Thanks in advance.
| f5a79a86137d083138f4cb20f31068c81f1e77bfdb5d0c650e1b449aa85cbd2c | ['791ae5606b36458c8196629916aa1929'] | If I can add something.
For my own purpose, I've try to create a handler which perform a little bit similar operation, but the point is that I've used self.request.host or self.request.route instead of arguments.
Doing this, and parsing the result with a switch case or if/elif/else loop, allow me to create a class named URIHandler which is use to route any kind of request to the correct ressources (even 404/500/yyy error pages) dynamicly whithout having to rewrite or add route for each new ressources.
So I'll be interested in comparing the two method to bench them a little bit.
|
c56d09fd5f6a62e8bf9c13aa47694843a1a33ba218c53958e45fd1a79aa4a608 | ['791e838de8954950acc2e346b4ac4079'] | I was able to create a simple python script to do this:
set_im_status.py
#!/usr/local/bin/python
import sys
import dbus, gobject
from dbus.mainloop.glib import DBusGMainLoop
dbus_loop = DBusGMainLoop()
bus = dbus.SessionBus(mainloop=dbus_loop)
dbus_obj = bus.get_object("im.pidgin.purple.PurpleService", "/im/pidgin/purple/PurpleObject")
purple = dbus.Interface(dbus_obj, "im.pidgin.purple.PurpleInterface")
status = sys.argv[1]
# Available
if status == "a":
status_id = dbus.String(u'available')
# Busy
elif status == "b":
status_id = dbus.String(u'unavailable')
# Away
elif status == "w":
status_id = dbus.String(u'away')
# Invisible
elif status == "i":
status_id = dbus.String(u'invisible')
# Offline
elif status == "f":
status_id = dbus.String(u'offline')
else:
status_id = dbus.String(u'available')
status_type = purple.PurplePrimitiveGetTypeFromId(status_id)
saved = purple.PurpleSavedstatusNew("", status_type)
purple.PurpleSavedstatusActivate(saved)
Now to set the status to 'Busy', run: % python set_im_status.py b
| cb9c94bc05a6b188dd320cdaabc38852f0300188ce8f97a94c38df38b054a2f6 | ['791e838de8954950acc2e346b4ac4079'] | How can I set/change my status (like Available/Busy/Away) in Pidgin instant messenger from the command line? I needed this to make sure that my status changes to 'Away' whenever I lock my screen. I installed the 'awayonlock' plugin, but it doesn't seem to work with MATE desktop environment.
|
48ddfa4f0532e3d5671f125d6d069c268829af3a28eec8f1d1810e4f08b85635 | ['79236930df734a95b42ece1ae25499df'] | I get this questions title when trying to update a record in Microsoft PowerApps + SQL server. This particular table happens to have 3 out of four fields as keys. I can confirm that I have permissions on my user to update the record. New records can be created just fine, just not updating ones. Very confused on how to correct this issue as it was working fine prior to the weekend.
| 05733ee18f3401cd2647ddd9ddd7b30f8384634a363ad09a5e5727208c229c70 | ['79236930df734a95b42ece1ae25499df'] | Locally testing Azure Durable Functions with VSCode + JavaScript. Able to successfully trigger the HTTP triggered Orchestration Client and can even see the request headers + body no problem. However, I receive the following error when attempting to trigger the Orchestrator:
Unable to cast object of type 'Microsoft.Azure.WebJobs.DurableOrchestrationContext' to type 'System.String'
I don't understand why DurableOrchestrationContext is trying to be turned into a string.
Code calling the Orchestrator:
context.bindings.patient = [{
FunctionName: "OrchestratorJS",
Input: req,
InstanceId: id
}];
Notes:
- I tried sending just a string as the Input, but to no effect.
- I have successfully created Durable Functions for a different project which makes this even more frustrating.
|
70f1afc6107ebe3888034c88c60723f4b8a6ed60e6f4a47e2db9ee1f59e85789 | ['79267f68af8047629f1083b668a83990'] | var_dump($request) gives following output
object(Core)#7 (1) {
["_data":"Core":private]=>
array(1) {
["uid"]=>
string(7) "1700451"
}
}
The core class is as follows-
Class Core{
__construct(){
}
public function __get($name) {
if (!$this->_data[$name]) {
return null;
}
return $this->_data[$name];
}
}
How do i call the __get method to obtain the uid from the $request obj.
Please do not suggest changes in the code.I just want a way to get the uid from the $request variable.I am weak in OOP.
| 6295a38f8df243cc0a72d5153b33411dce6407e84298618a4e7d9ed2ebde6337 | ['79267f68af8047629f1083b668a83990'] | i have a form which contains multiple input text box that will take emails.
<li style="text-decoration: none" id="email1"><input type="text" name="email[]" /></li>
<li style="text-decoration: none" id="email2"><input type="text" name="email[]" /></li>
There will also be option to add more input fields.
i want to loop over each email so as to perform pre-post validation.
How do i loop over email[] using jquery
|
99921080b0c3434ea92b3185fe18368386a907c000b1f2cdb3432a451c0d50fd | ['7935ea0fc9c1412399c7e841fa58ff89'] | In vs2010 you goto PROJECT ---> SLN Name properties --> COMPILE ---> ADVANCED COMPILE OPTIONS(BOTTOM). Now Reverting it to 3.5 is something that as far as I know is something you can't do, atleast not easily or advised. Obviously upgrading from say a 2.0 to a 3.5 or 4.0 framework is easy as the step's above. Your best bet is unfortunately to create a new project in the 3.5 framework.
| 3a1d6969b4beba68881aa954c167b6e08cc293d0b6dfab7989d5c99cc9f0dbf7 | ['7935ea0fc9c1412399c7e841fa58ff89'] | I installed the adt-plugin for eclipse. I'm using Ubuntu 10.4 and have been stuck on this issue for 2 days now.
Select Window > Preferences... to open the Preferences panel (Mac OS X: Eclipse > Preferences).
Select Android from the left panel.
For the SDK Location in the main panel, click Browse... and locate your downloaded SDK directory.
I cant find the location of the downloaded plugin and have looked in /usr /etc /home everywhere possible, I still can't believe im stuck on something so simple. Anyone who could point me into the right direction, would help me sooo much.
thnx
hi.im.new
|
4f4096643a9248d71712103897df4eae01769b736f7181051646ecec162c93cc | ['794442ca3cd94b8f8dd31cf3e31176b6'] | I was reading pattern recognition and machine learning by <PERSON> in chapter 4.1.3 page 186 about least square classification failure I stumbled on this phrase
"The failure of least square should not surprise us when we recall
that it corresponds to Maximum likelihood under the assumption of a
Gaussian conditional distribution"
however, I can not understand this! what is least square relation with conditional? why are we talking about conditional distribution? and how can it relate to gaussian?
I would be so grateful if U could help me. please.
| 018d7c6ecb816d0daac7ac286148afd8cd6b0bfa4f5644110008638044038253 | ['794442ca3cd94b8f8dd31cf3e31176b6'] | 3: wlan0: mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:22:fb:90:f0:b8 brd ff:ff:ff:ff:ff:ff
inet <IP_ADDRESS>/24 brd <IP_ADDRESS> scope global wlan0
valid_lft forever preferred_lft forever
inet6 <IP_ADDRESS><PHONE_NUMBER> brd <PHONE_NUMBER> scope global wlan0
valid_lft forever preferred_lft forever
inet6 fe80::222:fbff:fe90:f0b8/64 scope link
valid_lft forever preferred_lft forever |
2346f1ee63227807b9d5a4851ab06e4896476760352d046ed8a1e412ffedfa70 | ['79541e5220264d27bb0d9e3f8cd7adf0'] | I've found out that the Xerces2 Java Parser 2.11.0 that I used contains some bugs when using recursive element definitions and key/keyrefs. When I tried to validate the above XML using oXygen XML Developer, it succeeded, which leads me to believe the bug report at Apache's issue tracker is accurate.
| c43fd7ba1cc5700e39b9fb2a8b56ab213ab3f61c3a36bb33b8a157451aa4d1c2 | ['79541e5220264d27bb0d9e3f8cd7adf0'] | I have a simple question. Why doesn't Mage<IP_ADDRESS>log work in an Adminhtml block??
I know the file is being read/loaded because when I put in die() on the first line of the file I get a blank screen, and removing/renaming the file also causes trouble.
Thank you for any tips.
|
876e31f7f16dee64eced83bca642533748c5a18d7ac7233fa00a49b8e7bc0b80 | ['7968e672787741818c96aa0a9ca3011c'] | You can create a file to run with node to act as your proxy. Like this:
proxy.js
const httpProxy = require('http-proxy');
const proxy = httpProxy.createProxyServer({
secure: false,
changeOrigin: true,
target: 'https://someOriginURL.com',
// could be an IP address target: 'https://XX.XX.XXX.XXX/',
}).listen(3500, () => console.log('Proxy running on port 3500'));
// Intercepts the request
proxy.on('proxyReq', function(proxyReq, req, res, options) {
console.log(req);
// Set the headers of the intercepted request
proxyReq.setHeader('Origin', 'https://yourorigin.com');
// remove any headers you want
// proxyReq.removeHeader('authorization');
res.oldWriteHead = res.writeHead;
res.writeHead = function(statusCode, headers) {
res.setHeader('Access-Control-Allow-Origin', '*');
res.oldWriteHead(statusCode, headers);
}
});
to use this open a terminal and run:
node proxy.js
P.S.: Don't use this in production :D
| 159af68313c36819a2b27ecd5b500bbdc09065f93e2221ce5d4cd2a4257db395 | ['7968e672787741818c96aa0a9ca3011c'] | Well node.js is highly used in big companies nowadays. Each backend technology has its upsides for development and also its limitations. Facebook for example uses assembly in some parts of their big data processing to get the most out of every bit. If you are not relying in processing a thon of data, like Artificial Intelligence apps or any exponential use of data you are good with nodejs. As you can see in the article companies with hundreds of millions of users like Netflix uses nodejs to develop their web app... Now their software to process the data from its users it is definetly not using nodejs.
|
c48808b50d81de6f1d52afe2c94d7bcc6db035875b0d3189d09e666c84776e14 | ['7971605a81654835aa94b3c788211d26'] | Playing with xtk (http://www.goxtk.org). How do you impose a size to the renderer? I'm asking because upon calling init on the renderer, the container div grows. I'm not using width or high 100% as in the examples, I'm using an absolute size. Thanks for any hint.
| e186b11176ac200911b6aa6a58d648aaa3af7e9b078ab52269160e561e09b0ca | ['7971605a81654835aa94b3c788211d26'] | I've tried xtk release 2 as well as built xtk.js from source and there seems to be an issue (that wasn't there in release 1) when xtk is used alongside jquery.
No matter what I do, I always get a
"Uncaught Error: Could not find the given container or it has an undefined size."
in the javascript console.
To reproduce the issue, I modified the sample html page on the xtk wiki, reported here for convenience:
<html>
<head>
<title>XTK TEST COMPILED!</title>
<script type="text/javascript" src="xtk.js"></script>
<script type="text/javascript">
var run = function() {
var r = new X.renderer('r');
r.init();
var cube = new X.cube([0,0,0],10,10,10);
r.add(cube);
r.render();
};
</script>
<body onload="run()">
<!-- the container for the renderer -->
<div id="r" style="background-color: #000000; width: 100%; height: 100%;"></div>
</body>
and changed it to
<html>
<head>
<title>XTK TEST COMPILED!</title>
<script type="text/javascript" src="xtk.js"></script>
<script type="text/javascript" src="jquery-1.7.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var r = new X.renderer('r');
r.init();
var cube = new X.cube([0,0,0],10,10,10);
r.add(cube);
r.render();
});
</script>
<body>
<!-- the container for the renderer -->
<div id="r" style="background-color: #000000; width: 100%; height: 100%;"></div>
</body>
If you test this page (I tried Chrome and Firefox), you'll get the error reported above.
Any ideas on how to tackle this? I'm investigating...
|
458646099e4510ed1904ad8619520e2b07db688df67797e4be233293b51944a7 | ['7974a3d4ed804eb5b32036173c767469'] | I'm using Solr to index documents like .pdf or .docx. These documents are in french or in english and I want to use the stemisation for both languages.
For exemple, if I search "chevaux" I want to find "cheval" (french) and if I search "raise" I want to find "raising" (english).
Is there a way to do this without createting 2 core (one in english and one in french) ?
| a36c19e231130c2e33136da56f52552f38b7d8fa8657485614e961dd6e6c97e4 | ['7974a3d4ed804eb5b32036173c767469'] | I want to use Solr with PDF files, but I don’t know how configure solrconfig.xml and schema.xml. What should I write in those file ? The aim is to do full-text search with synonym or spell checker for example.(I use Solr on Windows, and in the future i will use the API SolrNet).Thank you !
|
e491cf97d1e90e3978d5c22e80c4e15d27b5052bb6746f0cb68fc15a6800c0cb | ['798ad7c49c2a4c07985d3449b8f0e3ae'] | I created multiple inheritance by using dynamic dispatch. It's an overly complicated way to accomplish the properties of a mass customization system. What you fundamentally want is the ability to integrate processing from multiple modules. Manufacturing architecture allows a container to infinitely grow -- these terms are from business -- in two ways:
Vertically: extending the process (instead of subclassing to do it)
Horizontally: adding new processes (instead of subclassing or inheriting to do it)
Multiple inheritance's other problem is that it introduces ambiguity. It is unclear which method should be invoked when both classes are inherited.
class A
{
public void One() { ... }
}
class B
{
public void One() { ... }
}
Manufacturing architecture such as mass customization, however, models processes as whole classes not just methods, and so the above problem is prevented by namespaces.
namespace A
{
class OneProduct { ... }
class One : Producer<OneProduct>, IProcess { ... }
}
namespace B
{
class OneProduct { ... }
class One : Producer<OneProduct>, IProcess { ... }
}
// example of a hardcoded process
namespace IntegratingProcess
{
class MyProduct { ... }
class MyProcess : Producer<OneProduct>, IProcess
{
private A.One Machine1 { get; set; }
private B.One Machine2 { get; set; }
void D() { // allocate memory for all machines and product DTO }
void O() { // binds Machine1 and Machine2 to MyProduct reference properties }
void M()
{
Machine1.M();
Machine2.M();
}
}
}
Mass customization allows you to dynamically integrate processing and change firing order. This is of course an alternative to the hardcoded form above, where the production process and its firing order is built at compile-time. My R article covers mass customization, but I don't give away the source code for it.
I am the developer of POWER, a manufacturing architecture and the rules to effectively wield it. My articles instruct programmers on how to correctly model collaborative work with source code.
http://www.powersemantics.com/power.html
| f451f98c7fe19dfdd8de52a79c7756672165b44ac9ac9b575d2f27fe9a39a28d | ['798ad7c49c2a4c07985d3449b8f0e3ae'] | Don't assume importing data is as easy as dumping it in your database and having the computer handle all the processing work. As you've discovered, an automated load can have problems.
First, database ELT processes depreciate the hard drive. Do not stage the data into one table prior to inserting it in its native table. Your process should only import the data one time to its native table to protect hardware.
Second, you don't need third-party software to middle-man the work. You need control so you're not manually inspecting what was inserted. This means your process is to first clean / transform the data prior to import. You want to prevent all problems prior to load by cleaning and structuring and even processing the data. The load should only be an SQL insert script. I have torn apart many T-SQL scripts where someone thought it convenient to integrate processing with database commands. Don't do it.
Here's how I manage imports from spreadsheet reports. Excel formulas are better than learning ETL tools like SSIS. I use cell formulas to validate whether the record is valid to go into our system. This result is its own column, and then if that column is true, a concatentation column displays an insert script.
=if(J1, concatenate("('", A1, "', ", B1, "),"), "")
If the column is false, the concat column shows nothing. This allows me to copy/paste the inserts into SSMS and conduct mass inserts via "insert into table values" scripts.
If this is actually updating existing records, as your comment appears to suggest, then you need to master the data, organizing what's changed in logs for your users.
Synchronization steps:
Log what is there before you update
Download and compare local vs remote copies for differences; you cannot compare the two without a) having them both in the same physical location or b) controlling the other system
Log what you're updating with, and timestamp when you're updating it
Save and close the logs
Only when 1-4 are done should you post an update to production
My guide to synchronizing data sources and handling Creates/Updates/Deletes:
sync local files with server files
|
ac9ace53f366209bb33cbd57f53dccfd42603bd41f31b854ca5df58eee07d69c | ['799dd46b5a914977b9b4677b08f6cc2e'] | It seems that you'll need to massage the input to match the expected format for your charting library. Here is a snippet that shows how you can do this.
For a given input:
var obj = {
"chartName": "Idle Times",
"disk": 0,
"OpCode": "Read",
"xAxis": [0,100,200,300,400],
"yAxis": <PHONE_NUMBER>,8565,11419,9704,7598]
};
Loop through the xAxis values:
var results = [];
for (var i = 0; i < obj.xAxis.length; i++) {
results.push({
"chartName":obj.chartName,
"disk":obj.disk,
"OpCode":obj.OpCode,
"xAxis":obj.xAxis[i],
"yAxis":obj.yAxis[i]
});
}
| 6cd8ea97aa0e7a73e1d485002efb333243ad7d8ca0fad4452440f23e236e9e83 | ['799dd46b5a914977b9b4677b08f6cc2e'] | To enable log aggregation, which then allows you to run the "yarn logs" command to see the logs for an application id, set these in your yarn-site.xml:
yarn.log-aggregation-enable
yarn.log-aggregation.retain-seconds
yarn.log-aggregation.retain-check-interval-seconds
It seemed necessary to restart yarn after making this change.
Note the command that was referenced in a comment will work after aggregation has been enabled:
yarn logs -applicationId application_1397033985470_0006
See: http://hadoop.apache.org/docs/r2.2.0/hadoop-yarn/hadoop-yarn-common/yarn-default.xml
Descriptions for these parameters are available in the 2.3.0 documentation: http://hadoop.apache.org/docs/r2.3.0/hadoop-yarn/hadoop-yarn-common/yarn-default.xml
|
5eda075626cfeaf4eb22b70e5ed3dde04eeaed1300df918055fe9959c2fd0220 | ['79aca4abe8d04d36974cdc287896835d'] | I am trying to find the total size of a root directory on an FTP server. However, I do not have access to one of the directories in the root.
I want to use this function to sum the sizes of the directories in the root:
size = 0
for filename in ftp.nlst("."):
ftp.cwd(filename)
size += ftp.size(".")
print(size)
This generates the error:
ftplib.error_perm: 550 Could not get file size.
I can't find any documentation about excluding an item from a for loop.
| f69136cad2e221f4f0372244abf2298c75e550d38cfbba49ddba26fd4f414b6d | ['79aca4abe8d04d36974cdc287896835d'] | I am trying to print the nth line after a specific line in a file:
import glob
import numpy as np
import matplotlib.pyplot as plt
import math
velerror = []
divergence = []
mesh = []
timestep = []
totaltime = []
for files in glob.glob('*.out'):
f = open(files, 'r')
for line in f:
if "Maximum Velocity Error:" in line:
velerror.append(float(line[32:40]))
if "Grid Dimensions, Mesh" in line:
mesh.append(int(line[27]))
if "Time Step " in line:
timestep.append(int(line[17:27].strip()))
if "Total time:" in line:
totaltime.append(float(line[47:57].strip()))
#Print nth line after line
totaltime = totaltime[<IP_ADDRESS>9]
print(velerror)
print(mesh)
print(timestep)
print(totaltime)
Is there a function like next() that goes to the next nth line?
|
d642c022931e2909fd256eff736eb50bc86996584219e11fbb6dfcfb4315cb70 | ['79b3ae70f290451d98fb381a685b3e2e'] | In res/values/styles.xml (create it if you don't have it), you need to declare a theme for your application like this:
<style name="MyTheme" parent="android:Theme.Holo.Light">
<item name="android:windowBackground">@drawable/splash_image</item>
</style>
And then, in AndroidManifest.xml file, under the application tag, you need to add this:
android:theme="@style/MyTheme"
And that is all. OnCreate is only called after the loading is done!
| 1d5a16bb17dac778258a9d4db9efdfb0679242ba20bdfd7e8ea5c0da46f4c891 | ['79b3ae70f290451d98fb381a685b3e2e'] | I am working with a ListView. I add 10 elements to it at the beginning, and add elements on click. My problem is that the child count is not updated.
mItems = new ArrayList<String>();
mItems.add("Diary of a Wimpy Kid 6: Cabin Fever");
...
mItems.add("Death Comes to Pemberley");
// 10 items
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
android.R.layout.simple_list_item_1, mItems);
mListView = (RefreshableListView) findViewById(R.id.listview);
mListView.setAdapter(adapter);
After that, at some point, I have:
mItems.add(result);
invalidateViews();
The new item is shown, but the getChildCount() still returns 10.
I need that call to return the right value, because at some point I need to learn if the last element is shown using this:
if (this.getLastVisiblePosition() == this.getChildCount())
In that check, I have this.getLastVisiblePosition() = 11 and this.getChildCount() = 10.
How is it possible that the last shown child position is bigger than the child count?
Adding multiple elements, I eventually get to a 15 to 10, so it's not a one-time occurence.
Any thoughts will be appreciated!
|
04b6ffdb5eecf3fcc7fb5cb609ff5f149afc208e3776afebd9bb9f33c3e0356b | ['79c18022cbea416292e9be5b95b295f0'] | Try this in Conditional formatting > New Rule > Use a formula to determine... :
=VLOOKUP($A1,'Sheet2'!$A$1:$B$26,2,0)="Yes"
And pull down to copy formatting only or change "Applies to" in the Conditional Formatting menu.
The problem was that you fixed the row, and not the column.
| dbd68242ed2a1ee69681e4d5ed3e6b84fb6b2b59d848fe1f2af04eee62d62791 | ['79c18022cbea416292e9be5b95b295f0'] | You can use SUMIF
Assuming your products are in column G, the quantities are in column H and the list of products you want to sum are starting from cell A1, you can write =SUMIF(G:G,A1,H:H) to cell B1 and pull down.
It will sum the quantities in column H if the value of column H equals to the values in column A.
|
c9ac1a2f3f01b7d827958b19d24483f87475c10f97b7f2bd9bed323ec9fd0866 | ['79f48b12c77946ca8c3514a66869c063'] | If we have a Galois field $GF(2^3)$ for example, and I want to generate 12 indeterminate variables over this field $\alpha_1,\alpha_2,\alpha_3,\cdots,\alpha_{12}$ in Matlab, such that the addition and multiplication of this indeterminate is the same as the addition and multiplication of tow element in $GF(2^3)$.example if $GF(2)$ and $\alpha_1 \in GF(2)$ then $\alpha_1+\alpha_1=0$,
thanks.
| 32646f0b4a99b5af7e770690c5832a3c24b55324d834d80bc35dc911dc2aa736 | ['79f48b12c77946ca8c3514a66869c063'] | In the following picture the "BUTTERFLY NETWORKS" with edge capacity equal $1$,
we define vector associated to edge $ST$ by $f_{ST}$, so we have the vectors for all edges as :
and also from the max flow min cut theorem, the max flow from source $S$ to any node in the network is the number of edges whose removable disconnect $S$ to this node , because the capacity of edges here is one.
we not the max flow from $S$ to any node non source (not $S$) $T$ on this network by $$maxflow(T).$$For example $maxflow(U)=1$,$maxflow(Z)=2$.
Write $V_T =\langle \{f_e : e \in In(T)\} \rangle$ , where $\langle \cdot \rangle$ is spane, and $e \in In(T)$ the vector for edges in in node $T$.
For example $V_W =\langle \{f_{TW},f_{UW} \} \rangle$.
We define for this example $\omega=2$.
and we have the following condition :
(2.5) $dim(V_T) = \omega$ for every non-source ( not node $S$) node $T$ with $maxflow(T) ≥ ω$.
So to meets the criterion (2.5) for this example we must have:
$f_{TW}$ and $f_{UW}$ are linearly independent.
$f_{TY}$ and $f_{XY}$ are linearly independent.
$f_{UZ}$ and $f_{XZ}$ are linearly independent.
Equivalently, the criterion says that $$s,t,u,v,y,z, nr − pq$$
$$npsw + nrux - pnsw - pqux, \text{ and } rnsw + rqux - qpsw - qrux$$ are all nonzero.
My question is, I haven't understood why :
Equivalently, the criterion says that
$$s,t,u,v,y,z, nr − pq$$ $$npsw + nrux - pnsw - pqux, \text{ and } rnsw + rqux - qpsw - qrux$$ are all nonzero ?.
I hope to find the answer, thanks.
|
cd2e7360a160bc62c543c4d71c6abaf217c8d68b97efb74b763f058710c900f6 | ['79f62683a1e042738c5db6d6eea4f191'] | You should use "command --help" to get more info about any command, where command in this case is rm
eg. rm --help
$ rm --help
Usage: rm [OPTION]... [FILE]...
Remove (unlink) the FILE(s).
-f, --force ignore nonexistent files and arguments, never prompt
-i prompt before every removal
-I prompt once before removing more than three files, or
when removing recursively; less intrusive than -i,
while still giving protection against most mistakes
--interactive[=WHEN] prompt according to WHEN: never, once (-I), or
always (-i); without WHEN, prompt always
--one-file-system when removing a hierarchy recursively, skip any
directory that is on a file system different from
that of the corresponding command line argument
--no-preserve-root do not treat '/' specially
--preserve-root do not remove '/' (default)
-r, -R, --recursive remove directories and their contents recursively
-d, --dir remove empty directories
-v, --verbose explain what is being done
--help display this help and exit
--version output version information and exit
By default, rm does not remove directories. Use the --recursive (-r or -R)
option to remove each listed directory, too, along with all of its contents.
To remove a file whose name starts with a '-', for example '-foo',
use one of these commands:
rm -- -foo
rm ./-foo
Note that if you use rm to remove a file, it might be possible to recover
some of its contents, given sufficient expertise and/or time. For greater
assurance that the contents are truly unrecoverable, consider using shred.
GNU coreutils online help: http://www.gnu.org/software/coreutils/
Full documentation at: http://www.gnu.org/software/coreutils/rm
or available locally via: info '(coreutils) rm invocation'
| c7a0e2248f7b832748ecc205cefff2eb087a83e404c76c3f493931ab5935892d | ['79f62683a1e042738c5db6d6eea4f191'] | Thank you! I meant to include this in my original post (and have now), but I guess the only other approach I can think of taking is performing a two-way ANOVA in which I treat the assessment date as a fixed effect in the model, but this doesn't seem correct to me. Any thoughts? |
b30fd42251027b90e309ffcdc1febc82201d1209a0b2fa37117aef4c0dda11ee | ['79f79ef8145043359a6471b1ec45bbc0'] |
that means we can write velocity as a function of distance
That's not quite the intended meaning. Rather, the intended meaning is:
If you could write velocity as a function of distance in the domain of interest, then the equation would hold.
It's up to you to deduce whether that assumption can be met satisfactorily in the problem, but usually it's quite obvious that it can.
One way to see this is that you can artificially restrict the domain to the portion of space and time that is of interest and disregard the rest of the domain, and then argue that this assumption would hold there.
(Notice I basically just rephrased the continuity notion of a limit here.)
The only way for this to be false in your particular example is to have multiple velocities at a given point in time (or no velocity at all), which generally wouldn't make sense in the (continuous) everyday world we're familiar with.
And if the discussion is about some unusual boundary condition where you can't take a limit on all sides and show the problem is continuous, then you wouldn't read such a claim about that situation without some kind of other (implicit or explicit) indication as to why it's true.
| ea42670703185bb654ea09015d8a05f20d55c13d884f250d8f7a363d3d51cb5b | ['79f79ef8145043359a6471b1ec45bbc0'] | I have a stateful black box with four real-valued inputs and one real-valued output. My problem is to predict the output at each moment in time, given the sequence of inputs seen up to that point. During a learning phase, I can vary the inputs however I want and observe the output. There's a little noise, of course, and the black box doesn't appear to be completely deterministic.
Specifically, I'm modeling a hard drive, and I want to predict the access time of the latest request given all previous requests. I want a more black-box approach, though, because of the complexity of explicit models, and because I want this to work for other similar devices such as SSDs.
A couple of people have suggested that signal processing might be appropriate to analyze the sequences of input and output values.
Are there any ideas from signal processing that could help me to predict the output, or to characterize the input?
|
3fc2c8933d54499d71269546c1dc9d0a2ae578d2931ff8d43e8e86b1cfe56b20 | ['7a14e3f50c6640538d96691ecd2152db'] | I am fairly new to studying networking, and this is something I have been wondering even though it may be a basic question. I've spoken with people in the networking world and they talk about having to remotely connect (via Telnet or SSH) to devices in order to look at configurations and make changes. In my studies I have also fiddled around with remote connections, but never across a WAN or connecting to a device in another network.
Let's say you have two office branches located in different states, they are not connected via leased lines and instead route traffic over the internet in order to communicate with each other. Let's say within Branch A there is a Cisco switch you need to connect to from Branch B. The switch has a private IP address of <IP_ADDRESS> /24. Since this is a private address, and not unique in any way, how does the person at Branch B initiate a telnet or SSH connection to the device?
Now I know a bit about NAT and PAT, but not a lot. I understand with PAT, if a device wants to communicate with say a web server across the internet, its private address is translated to a public/routable IP and uses port numbers to identify the session. This makes sense because the web server can see who to reply to. But in the case of my telnet example, how is the user in Branch B able to find the exact device in Branch A when the device is configured with a private address?
I'm sorry if this is very basic, I'm trying to better understand the concepts here but am having a hard time with this one. This could apply to multiple protocols, not just SSH or Telnet, but I'm just using them as an example.
| 1cc0b3d8762057d645638613160f12129bba75c34a70eb4396142f2e397196ee | ['7a14e3f50c6640538d96691ecd2152db'] | I have been trying to do this, and it has been a headache and a half. I replaced my optical drive in my MB pro (mid-2012, running 10.11.6) with an Evo 860 SSD. My idea was to keep my standard internal HD as my OS X drive, and dedicate this newly installed drive for Windows 10.
I will save the long winded explanation of everything I have tried to do to get this to work, I've been trying to figure this out for ~14 hours, it would take all day. Upon Googling this issue I found some people saying it is impossible to get Windows 10 to install and boot from a HD that is not in the main bay of a Macbook.
Is this true? Can anyone point me to a guide or something that shows otherwise? The only thing I can find when trying to look into this is booting from Windows on an external/USB drive, which is obviously not what I am intending to do.
Worse comes to worst, I'll have to swap my new SSD with the older HD so it sits in the "first" drive bay. But I'm more curious about whether anyone has accomplished what I am trying to do without the need to swap bays.
|
f28b3b7eb5c4bb5a344d057b3145c77f5afe79cf480171544dd3994cc98baac7 | ['7a2a88946d0b4a45a3afb9184d3d2922'] | In a backup script I found online for CentOs 6. It only saves the date in the file name and I need it to do time too.
d=$(date --iso)
How would I edit this to do date and time? I tried searching and reading tutorials for bash but didn't find what I needed or didn't know it would help me.
| d1bd1a4f36b066418bcdf4a444933548755e070f475e097f2d515d0d3bdb44da | ['7a2a88946d0b4a45a3afb9184d3d2922'] | I plan on putting this list of bad words (https://github.com/shutterstock/List-of-Dirty-Naughty-Obscene-and-Otherwise-Bad-Words/blob/master/en) into a .txt file on my web server. How can I this javascript check the variable "userNickName" against the .txt file named "blacklist.txt" on my web server.
(This is the code I want the bad word check implemented on, how would I do that?)
if (wsIsOpen() && null != userNickName) {
var msg = prepareData(1 + 2 * userNickName.length);
msg.setUint8(0, 0);
for (var i = 0; i < userNickName.length; ++i) msg.setUint16(1 + 2 * i, userNickName.charCodeAt(i), true);
wsSend(msg)
|
15f4d271ec3d6fe013dccc44e6366e3490c8ea0520e96543fbb2235d1a751026 | ['7a2dcac303ed4b08ac00ac828a3f40f8'] | I have a question about the proper notation of the following (simplified) example:
I want to express that I choose the value $x_i \in S$, such that $f(x_i)$ is the maximum value in the set $\{ f(x_k) \}$ where $x_k \in S$.
I thought about the following notation: Choose $x_i \in S$ such that $f(x_i)=max_{x_k \in S}(f(x_k))$.
Is it correct?
| ea0b451090793c97bf21b0278501eae9db9e0172c5b323d8529a533af50e50c2 | ['7a2dcac303ed4b08ac00ac828a3f40f8'] | I actually had the same issue today.
I had a CNAME record for a mail subdomain pointing to the domain which was configured correctly. This configuration also worked fine for the last years until today...
However I solved it by removing the CNAME record and creating an A and AAAA record for my mail subdomain pointing directly to the IP / IPv6.
Seems to work for me again. Maybe you are just missing the AAAA record?
|
45723ab8bdd1e50b147dfa142b1fef8670521ab87424848b52c915ab1b28d595 | ['7a32b0ca97854a4a8ce553ccae035e81'] | i'm struggling with understanding the logic behind this query i need to do for a batch job. i am querying the contentdocumentlink object because i need to capture files (potentially multiple) related to specific campaigns. since its a batch i want to query all campaigns that had files added to it each day and store the URLs of the files for each campaign.
i have:
final ID campId;
List<Campaign> campList = [Select Name, Content_Link__c FROM Campaign];
global String soqlQuery = 'Select ContentDocumentId FROM ContentDocumentLink WHERE LinkedEntityId=:campId';
any help means a lot, thanks!
| 8beaa93105254fe13832adad33d89adcce880ef0773cfd8d8b229acbbd362f28 | ['7a32b0ca97854a4a8ce553ccae035e81'] | I'm not sure if this addresses your problem, but look into the Key Derivation feature. You could provide the (hashed) password as part of the Context to the encrypt/decrypt requests and the hash would have to match to successfully encrypt/decrypt. https://www.vaultproject.io/api/secret/transit/index.html#encrypt-data |
1099be4a943df9b43b67ab0065945a35b305029ebb8ffcd37227bd08e2399b8f | ['7a3af618bca24b7396960b037b7e2cb2'] | I'm struggling trying to set the correct styles to avoid some issues with views overflow.
So, for the image above I need that the the yellow box shrinks as the orange box grows(as the text grows), but limiting the yellow box to a minWidth=100 and the orange box to be wrapped by the red box; the yellow box behave correctly...but the orange box overflows the red box when the text is big....I'm clueless about what to do to limit the orange box to stay inside the red box.
This is an example of the orange box overflowing the red box:
Ideally, if the text inside the orange box is too big for the container size, it should be clamped and not making the orange box to overflow the red box.
This is a link so you can see and play with the code that generates this views: https://snack.expo.io/SJD1bbhQX
Thanks, <PERSON>.
| fac6d3c48ecef50b5521e510c700f31971e9b70510db924666030153fbd8e6d4 | ['7a3af618bca24b7396960b037b7e2cb2'] | I wonder if there is any way to configure an app(Android and iOS) using native Google Nearby Message API sdk to get eddystone beacons notifications when the app is completely closed?.
Right now I have background scanning configured and it's working OK, but I also need to support the case when the app is closed. Thanks, <PERSON>.
|
206c42c42e7754ad071dfa55339a1e2c8cf7d14247b4aa4eac4417cdd5880ef5 | ['7a3e1f9c2d3b4802a8a326bc64483885'] | My party entered the temple of <PERSON>, got shot at by some monks, shot them dead, and defused some alarms. The first interesting thing we found was a guy who makes a "muffled shouting" noise. Presumably he is in a straitjacket.
I tried "converse" and I couldn't interact.
Recalling that sometimes "Surgery" was necessary to free people trapped by vines, I tried surgery and couldn't do it. I tried lockpick and it said "not a valid target."
I don't have any party members with "brute force" skill, or I would try that.
Possibly there is no way to interact with this character at this time. (I wonder why the game didn't give some clues as to why I can't interact.) Should I continue trying to interact, should I explore the rest of the temple first, or should I just leave the temple, wander away, and forget about it?
| e626bc71e2492f6877d0db30529124ffcb9fcce0dd493d1c83ecdf21a12cef60 | ['7a3e1f9c2d3b4802a8a326bc64483885'] | What <PERSON> said, but I should add that any time that state changes you will have to make sure to run that same code. The easiest way to insure this happens is by binding the box.Text property to the state object that you are interested in. That way, any change made to the object is immediately reflected in the text.
This blog post
helped me get started with data binding.... because I love FAQs.
|
e21a328c661766ced760d2e181e3e4406981573389b375e47a4ce5f86c3abedb | ['7a40ec91d84046919f0f59944aa65115'] | In our Model file, no need to add the below line of code.
App<IP_ADDRESS>uses('AppModel', 'CroogoAppModel');
Directly we can extend the AppModel.
And then, just we need to check with the method used in our controller action for model validation. It works depend on the cakephp version.
Eg : $this->Model->validate(), $this->Model->invalidFields();
/**
* MY_model Model
*
*/
class MY_model extends AppModel {
/**
* Validation rules
*
* @var array
*/
public $validate = array(
'first_name' => array(
'notempty' => array(
'rule' => array('notempty'),
'message' => 'Your custom message here',
)
)
);
}
It's working for me...
| 852b14706cf27f38d84ec439737ddab9c452db3c8954229a289a6a2cec5bbe7e | ['7a40ec91d84046919f0f59944aa65115'] | Here is a simple solution for browser close event. I faced some issue with "onunload" and "beforeonunload" events. It will be triggered for browser close, tab close, any link click, URL change. So i customized my code like this.
<script type="text/javascript">
jQuery(document).ready(function() {
var validNavigation = false;
// Attach the event keypress to exclude the F5 refresh
$(document).bind('keypress', function(e) {
if (e.keyCode == 116){
validNavigation = true;
}
});
// Attach the event click for all links in the page
$("a").bind("click", function() {
validNavigation = true;
});
// Attach the event submit for all forms in the page
$("form").bind("submit", function() {
validNavigation = true;
});
// Attach the event click for all inputs in the page
$("input[type=submit]").bind("click", function() {
validNavigation = true;
});
window.onbeforeunload = function() {
if (!validNavigation) {
var status = 'abandoned';
$.ajax({
type: "POST",
url: your action URL,
data: "status=" + status,
success: function(res) {
},
});
}
};
});
</script>
|
335bac06332464064770fe7b7f789bb0e5a62325296303338b339c4fdf477fff | ['7a584b834d3a4bd98284ec8b9aa6dc60'] | I want to know what can be problem if i have the following POC...
public void DoProcess() // called as Do_Work
{
textUpdater = null;
try
{
SetButtonEnabled(false);
aHandler = new DataHandler();
aHandler.Initialize(_configuration);
aHandler.GetDataFromWebAndSave();
MessageBox.Show("completed");
}
catch (Exception ex)
{
MessageBox.Show(ex.Message + " \r\n\r\n" + ex.StackTrace);
}
SetButtonEnabled(true);
}
Usually a backgroundWorker process includes a loop where one can easily see whether cancel is called or not. In my case, i can't check ...
Say I CLOSE the windows form (containing above code). Will everything be terminated safely ??
If not, then how can i do it ?
(i guess other way could be 'use thread').
| ebf7265589061ebe3cb0933977f374a051c5a01f8842c33dbec3fe858d015016 | ['7a584b834d3a4bd98284ec8b9aa6dc60'] | This could possibly appear to be a nasty thing to ask
but why do we have so short limit of number of objects in a list.
i wrote following code to test list size in C#
List<int> test = new List<int>();
long test1 = 0;
try
{
while (true)
{
test.Add(1);
test1++;
}
}
catch (Exception ex)
{
MessageBox.Show(test1 + " | " + ex.Message);
}
and the size of list could only be 134217728
isn't that unfair :( ??? what is alternate way if i want to add objects even beyond 'integer' limits (i mean number of objects > 2^32) ???
|
13234dcf79c7521bbf4103da1d525d4a388c3acd8b6b170eda2fab5ea54fa386 | ['7a5c016a26ee45f6add7de11043e4d3c'] | $$f(x)=-\frac{x}2-4$$
The goal is to find $\delta$ such that $\delta > \lvert x-(-2)\rvert > 0 \implies \exists\epsilon>0,\,\epsilon > \lvert f(x)-(-3) \rvert$
Start with $\epsilon$ and use that to define $\delta$:
$$\epsilon > \lvert f(x)-(-3) \rvert>0$$
$$\epsilon > \lvert (-\frac{x}2-4)+3 \rvert>0$$
$$\epsilon > \lvert -\frac{x}2-1 \rvert>0$$
$$\epsilon > \lvert-\frac12\rvert\cdot\lvert x+2\rvert>0$$
$$\epsilon > \frac12\lvert x+2\rvert>0$$
$$2\epsilon > \lvert x-(-2)\rvert>0$$
Now, simply define $\delta=2\epsilon$ and the proof is complete. In order to verify this, simply work through the above steps in reverse.
| e3a3bf938182a43cf1fc9439d77edffe099cfb20b831c331c8cd47eb2e7346c6 | ['7a5c016a26ee45f6add7de11043e4d3c'] | We currently have two AWS ubuntu instance running two websites on Apache. The instances are behind a load balance. I would like to know what would be the best way to sync the root folder for both servers. I would like to so a two-way sync. Right now when I have to change a file or to do an update, I have to login to both server and do exactly the same thing o both, so I would like to set something up so, no matter what server I update or change the files will be updated on the other server. I though on using Rsync but I read that it is not meant to do two-ways sync. Any help is appreciated. Thanks.
|
3571e1d623f446c4479e4bf5cf2f799caf581007cfbc70d700bc93a046e53edb | ['7a65e20e24214c9da77664dd88a3821e'] | I am trying to publish my vector layers in geoserver as WFS using the Leaflet library and I get the error like in the picture. How can I fix this error and is there any other way to publish WFS with leaflet?
<!DOCTYPE html>
<html>
<meta charset="utf-8" />
<head>
<script src=" https://<EMAIL_ADDRESS>/dist/leaflet.js "></script>
<link rel="stylesheet" href=" https://<EMAIL_ADDRESS>/dist/leaflet.css" />
<script src="https://code.jquery.com/jquery-3.2.1.js" ></script>
<style>
#map {
width: 100%;
height: 600px;
box-shadow: 5px 5px 5px #888;
}
</style>
</head>
<body>
<div id="map"></div>
<script>
var map = L.map('map').setView([0, 0], 2);
var owsrootUrl = 'http://localhost:8080/geoserver/ows?';
var defaultParameters = {
service: 'WFS',
version: '1.1.0',
request: 'GetFeature',
typeName: 'webalani:il',
outputFormat: 'application/json',
};
var parameters = L.Util.extend(defaultParameters);
var URL = owsrootUrl + L.Util.getParamString(parameters);
$.ajax({
url: URL,
success: function (data) {
var geojson = new L.geoJson(data, {
style: {"color":"#2ECCFA","weight":2},
}
).addTo(map);
}
});
</script>
</body>
</html>
| 26a1626d78e8ef01f393a03b5132050ea02fd8e16212ac0972f2a070466f91e0 | ['7a65e20e24214c9da77664dd88a3821e'] | I leave the popups open all the time and whatever I do in the popups always come on top of each other. How can I solve this as in the picture.
marker.on('click', function (event) {
var container = $('<div>DENEME<div/>');
container.html("This is a linkasd <a href='#' class='smallPolygonLink'>Click me</a>.");
container.append($('<span class="bold">').text(" :)"))
marker.bindPopup(container[0], { permanent: true, autoClose: false, autoPan: true, closeOnClick: false, offset: [0, 20] });
});
|
c282225796366d336a3ddc161035940d94b7033debbbd51036e85c7ea96498e6 | ['7a6632c5d12b4305a5f4928bc1fb0d6b'] | I have a class name DBConnection:
class DBConnection {
public function __construct() {}
public static function getConnection() {
try{
$conn = new PDO('mysql:host='.HOST.'; dbname='.DATABASENAME.'; charset=utf8', USERNAME, PASSWORD);
return $conn;
}catch(PDOException $e){
echo("Connect to database failed");
}
}
}
And a class name bookDA:
require_once("DBConnection.php");
require_once("../entity/book.php");
class bookDA {
private $conn = DBConnection<IP_ADDRESS>getConnection();//This line didn't work
public function getAll() {
$bookList = array();
$stmt = $this->conn->prepare("SELECT * FROM booklist");
$stmt->execute();
while($result = $stmt->fetch(PDO<IP_ADDRESS>FETCH_ASSOC)) {
$bookList[] = new book($result["bookId"], $result["bookName"], $result["bookPrice"]);
}
return bookList;
}
public function getByName($name) {
$bookList = array();
$stmt = $this->conn->prepare("SELECT * FROM booklist WHERE LIKE :name");
$stmt->bindValue(":name", "%".$name."%", PDO<IP_ADDRESS>PARAM_STR);
$stmt->execute();
while($result = $stmt->fetch(PDO<IP_ADDRESS>FETCH_ASSOC)) {
$bookList[] = new book($result["bookId"], $result["bookName"], $result["bookPrice"]);
}
return bookList;
}
}
i create a static method:"getConnection" inside class DBConnection, and in the class:"bookDA" i call it but it didn't work. So i try to put the line which didn't work outside the bookDA class and this work like a champ. Can anyone tell me why?
| e3226c6090566eee60ff3b1733d76fbb303b1a852bc97d16dccdd21444caf173 | ['7a6632c5d12b4305a5f4928bc1fb0d6b'] | I have some code:
class a {
public static function getCl() {
echo __CLASS__;
}
public function test() {
static<IP_ADDRESS>getCl();
}
}
class b extends a {
public static function getCl() {
echo __CLASS__;
}
}
$testClass = new b();
$testClass->test();
and this result : b. Then i try this:
class a {
public static function getCl() {
echo __CLASS__;
}
public function test() {
$this->getCl();
}
}
class b extends a {
public static function getCl() {
echo __CLASS__;
}
}
$testClass = new b();
$testClass->test();
this result is still b. I already know the different between static<IP_ADDRESS> and self<IP_ADDRESS> but can someone show me what is the different between static<IP_ADDRESS> and $this-> in my code. Which one should i use?
|
dd1f2232622a8dc7180bb4002e577bbc6edd875e28afcd41db18bf2853386b3f | ['7a9feb2a42d04ca881b8aea640ea963e'] | <PERSON> I shall relay your insult to the Dept. Chair of EE where I went to school. It was his advice, and it helped me when I was struggling. My advisor kept moving me from 1st author to 2nd author on papers. If you did your Ph.D., you will know that 2nd Author is the same as not even having your name on paper for purposes of meeting the Ph.D requirement. | a63b6ce0c315eb63e92a2bb3ee4ea1f849f93239695bfc8d8facab5b9a257b3a | ['7a9feb2a42d04ca881b8aea640ea963e'] | Thank you for your answer. This series comes out from a Laplace transform, but honestly I didn't know much more about it. The weight $(1-n/x)^{k-1}$ is large when $x$ is not a prime power but $\left\lfloor x\right\rfloor $ is a prime power. For $k \geq 1$ I already know how to handle it but since all the calculations I did hold for $k>0$ I thought it was possible to find an estimation of that series. |
e684ab3dbe69fd545b7d36ad1e3f48df9595e2a3d67134787cd3ce31b0da00b6 | ['7aae73f6be6c489fbeba67bf60d746e8'] | Depende de vários fatores, como para que plataforma e processador você quer? Considerando que você quer compilar para PC, se você estiver no Linux, eu indicaria certamente o g++ para C++ e o gcc para C, agora no Windows o MinGW apresenta o melhor custo beneficio, pois é free, e seria o g++ para Windows, o compilador da Microsoft o Visual C++, note que tanto a IDE quanto o compilador chama Visual C++ gera um código mais otimizado no entanto ele é pago, por isso para mim o MinGW é melhor, pois tem um custo beneficio ótimo, e resolve todos os problemas.
| d9e75d041859ae21dac991a40ef7dae7498ea486b7d0061edab1ba70bcb248e2 | ['7aae73f6be6c489fbeba67bf60d746e8'] | Thanks for the feedback, I really appreciate it. A little background of myself: I was raised bilingual in Cantonese and the "Hong Kong English" dialect until I was 4. Thereafter, I was enrolled in an international school, where the majority of teachers were British. At 11, I moved to Vancouver, and I've been living here since. As a result of all this moving around, my accent sounds like a bit of everything. Hopefully, this clears things up a bit. |
e427c9ddfa7cbc4b0564edce730c4c2c0b370179b2c1691c7a82ef3ffdb77948 | ['7ab553fcab5c4001ab626115c01d7d11'] |
$('.from_date').datepicker({
weekStart: 1,
startDate: '01/01/2012',
endDate: '01/10/2012',
autoclose: true
}).on('changeDate', function(selected){
$('.to_date').html(selected.format());
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.6.0/js/bootstrap-datepicker.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.6.0/css/bootstrap-datepicker.min.css" rel="stylesheet"/>
<div class="from_date"></div>
<div class="to_date"></div>
| c468bc70bd52a9c5cd15f555ff29091cd402d0bffdc7b659678cab8d2eaf8e61 | ['7ab553fcab5c4001ab626115c01d7d11'] | We're trying to specify which fonts CasperJS/PhantomJS should use when it finds a generic "sans-serif" css font. We tried to change the ~/.fonts.conf file, but it gets completely ignored.
Is it possible to tell CasperJS/PhantomJS which font to use, also specifying fallback fonts for different character sets (like Chinese, Japanese, Korean etc)?
|
c2e19d21c634f17470feee3744a6f5c952f733637a6044253ac9cb0776a0ee09 | ['7abb4cc577a74c388eaa430ca6dff2b3'] | One of the feature in my app is to unregister user from the remote pushnotification when user logs-out from the app. Is there way I can unregister the app from push notification when user logs out while the device is in airplane(offline) mode?
I tried this code but I still receive notifications when I come back online,
[[UIApplication sharedApplication] unregisterForRemoteNotifications];
Could some one help how to remove app from notification center when the device is in airplane mode?
| 4fab223741bc775cd67aed28d6449dcb933db455bc2f3c75b91bb4bf3167e04d | ['7abb4cc577a74c388eaa430ca6dff2b3'] | I am writing an application where I am pushing notifications to the client from the server. If server pushes many notification messages to the user, I see that there are multiple app notification icons in the notification bar(where there are other icons such as battery, connectivity etc) are displayed.
I want to limit it one but I still want to retain notifications in the notification drawer(in pull down pane).
I tried canceling notificationManager.cancel(int id), but it removes notification from the the notification drawer along with notification bar. Is there any extra flag or any api to get around this?
Thanks
|
cd03d5b65ce90ea7d2f079f387e5476992f5e2eee1128eabc6398bc5506aeb4d | ['7ac811e644994ff280ede00d6d0dcb8d'] | I had similar issue. I prepared following work around for me to validate 'required' with uncheckable ui bootstrap radio buttons.
give different ng-model to radio buttons
keep one hidden field for actual ngmodel
onchange of radio button update ng-model bind to hidden input field and update the other radio button to null value
keep required validation on hidden field. Field is hidden but mg-message is visible
in controller:
$scope.interacted = function (field) {
return $scope.submitted || (field ? field.$dirty : false);
};
<form name="my_form"
class="main-form container"
ng-controller="FormCtrl"
ng-cloak class="ng-cloak"
ng-submit="submit()"
novalidate>
<div class="control-group">
<div class="col-md-6">
<div class="btn-group">
<label class="btn btn-default"
name="radioModel"
ng-model="data.radioModel1"
btn-radio="'No'"
uncheckable
ng-required="!data.radioModel"
ng-change="data.q1 = (data.radioModel1 || null);data.radioModel2=null">No</label>
<label class="btn btn-default"
name="radioModel"
ng-model="data.radioModel2"
btn-radio="'Yes'"
uncheckable
ng-required="!data.radioModel"
ng-change="data.q1 = (data.radioModel2 || null);data.radioModel1=null">Yes</label>
</div>
<input class="form-control"
type="text"
name="q1"
id="input_q1"
ng-model="data.q1"
ng-model-options="{ updateOn: 'blur' }"
ng-keyup="cancel($event)"
required
placeholder="First"
style="display:none" />
<div class="error-messages" ng-if="interacted(my_form.q1)" ng-messages="my_form.q1.$error">
<div ng-message="required">Please select answer</div>
<div ng-messages-include="form-messages"></div>
</div>
</div>
<div class="col-md-6">
{{data.q1 | json}}
{{my_form.radioModel.$error | json}}
</div>
</div>
<input class="form-control" type="submit" />
| 11ab3168ed1cd6c7d7a7a9f9ff955e06df43c74b20cfbc2d64ab5a2cb7c16057 | ['7ac811e644994ff280ede00d6d0dcb8d'] | In CRM 2011, notes get automatically created and attached to main record on lost focus event. Requirement is to remove this auto save functionality. Only till main form is open user should be able to edit notes. And newly added notes should only get saved once main form is saved. For example, if user add one note and closes the browser or do not save the main form, then that note should not get attached to main record, new note should get discarded.
I was thinking following solution:
create new custom entity TempNotesHolder
Create 1:N relationship with the entity where we want this functionality, for example Case entity
Make actual case's note section read only(it is requirement, user don't want to edit/delete functionality for notes once note get created)
Write plugin for create event of Case and create one Record for TempNotesHolder and associate it with case(RegardingId field in TempNotesHolder = incidentId) This will ensure one Case will always have only one associated TempNotesHolder record. There is no way in CRM 2011 to ensure One entity record will have only one record in associated entity i.e. 1:1 relationship. At least I don't know the way. Let me know if any one are aware about it.
On Case form, add one IFrame below Case's note section
on case form load event, get TempNotesHolderId associated with case using fetchXml.(There is no actual field in Case entity that refer to associated TempNotesHolder, hence need to use fetchXml. Some how we can add associated TempNotesHolderId to Case entity, and place that field on Case form, make it hidden, to avoid fetchXml)
Prepare url to display only notes of TempNotesHolder record.(/_controls/notes/notesdata.aspx?EnableInlineEdit=false&EnableInsert=true&id=&ParentEntity=
Set this url to newly added IFrame, so notes of associated TempNotesHolder get displayed in IFrame. It will also have link "Add New Note".
User can add note to TempNotesHolder which are not directly added to Case record.
Next develop plugin on pre save event of Case and check if there are any notes added to TempNoteHolder, if yes move those notes to Case record, and delete notes for TempNoteHolderId. This way notes will get saved to main record only on main form save.
To handle browser close event after adding few notes to TempNotesHolder, write plugin on Case pre Retrieve event, check if any notes present for associated TempNotesHolderId, if present then delete those notes. (As notes are present on TempNotesHolderId, that means due to some reason these notes are not moved to actual case record and we no longer need them, so delete them. This will ensure on case load, TempNotesHolder note section always be blank)
The above solution was fine till step 8. When I tried to add notes in TempNotesHolder, it gave me error, "Record with does not exists in TempNotesHolder". Then I checked that GUID, I disappointed to know CRM is taking IncidentId when I create note for TempNotesHolder. Then I tracked down the actual code for create notes to find why it is taking IncidentId instead of TempNotesHolderId. I found following code in "_static/_controls/notes/notes.htc" function name "UpdateNote"
xml="0"+CrmEncodeDecode.CrmXmlEncode(value)+""+_parentCrmFormSubmit.crmFormSubmitId.value+""+this.parentEntityType+""+CrmEncodeDecode.CrmXmlEncode(currentTitle)+""+this.userId+""
CRM is taking _parentCrmFormSubmit.crmFormSubmitId.value as objectid while creating note.
Now I stuck with this problem. Any thoughts to overcome this show stopper issue are appreciated. Also any other alternate solution to main requirement are also welcome.
<PERSON> (Microsoft Dynamics CRM 2011 Developer)
|
47934e0117db9b522a11d64fd27e4b4471a0c1587f840317c028ecd89aee4e62 | ['7ac8a59451dd4de099094e272ed05908'] | Above you'll find all differents ways to iterate over a LIST.
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
public class test1 {
public static void main(String[] args) {
//******* Exercise 1 : Write a Java program to create a new array list, add some colors (string) and print out the collection.
List<String> colors = new ArrayList<String>();
colors.add("Black");
colors.add("Red");
colors.add("Green");
colors.add("Blue");
System.out.println(colors);
//******* Exercise 2 : Write a Java program to iterate through all elements in a array list.
System.out.println("//******* Exercise 2");
List<Integer> list2 = Arrays.asList(1, 2, 3, 4, 5, 6, 7);
// iteration type 1 : using FOR loop
System.out.println("// iteration type 1");
for(Integer nb : list2) {
System.out.print(nb + ", ");
}
System.out.println("\n");
// iteration type 2 : using FOR loop
System.out.println("// iteration type 2");
for(int i=0; i < list2.size(); i++) {
System.out.print(list2.get(i) + ", ");
}System.out.println("\n");
// iteration type 3 : using Do-While loop
System.out.println("// iteration type 3");
int index21 = 0;
do {
System.out.print(list2.get(index21) + ", ");
index21++;
}while(index21<list2.size());
System.out.println("\n");
// iteration type 4 : using While loop
System.out.println("// iteration type 4");
int index22 = 0;
while(index22<list2.size()) {
System.out.print(list2.get(index22) + ", ");
index22++;
}
System.out.println("\n");
// iteration type 5 : using Iterable forEach loop
System.out.println("// iteration type 5");
list2.forEach(elt -> {
System.out.print(elt + ", ");
});
System.out.println("\n");
// iteration type 6 : using Iterator
System.out.println("// iteration type 6");
Iterator<Integer> listIterator = list2.iterator();
while(listIterator.hasNext()) {
System.out.print( listIterator.next() + ", ");
}
System.out.println("\n");
// iteration type 7 : using Iterator (From the beginning)
System.out.println("// iteration type 7");
ListIterator<Integer> listIterator21 = list2.listIterator(list2.size());
while(listIterator21.hasPrevious()) {
System.out.print( listIterator21.previous() + ", ");
}
System.out.println("\n");
// iteration type 8 : using Iterator (From the End)
System.out.println("// iteration type 8");
ListIterator<Integer> listIterator22 = list2.listIterator();
while(listIterator22.hasNext()) {
System.out.print( listIterator22.next() + ", ");
}
System.out.println("\n");
}
}
| 560a9ca7f1874476ca1aa7ada1da533206ceffd46f0aba6808a82c72730315ec | ['7ac8a59451dd4de099094e272ed05908'] | Let's suppose you want the considere the class that split the list into multiple chuncks as a library class.
So let's say the class is called 'shared' and in should be final to be sure it won't be extended.
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public final class Shared {
List<Integer> input;
int portion;
public Shared(int portion, Integer... input) {
this.setPortion(portion);
this.setInput(input);
}
public List<List<Integer>> listToChunks() {
List<List<Integer>> result = new ArrayList<List<Integer>>();
int size = this.size();
int startAt = 0;
int endAt = this.portion;
while (endAt <= size) {
result.add(this.input.subList(startAt, endAt));
startAt = endAt;
endAt = (size - endAt < this.portion && size - endAt > 0) ? (this.size()) : (endAt + this.portion);
}
return result;
}
public int size() {
return this.input.size();
}
public void setInput(Integer... input) {
if (input != null && input.length > 0)
this.input = Arrays.asList(input);
else
System.out.println("Error 001 : please enter a valid array of integers.");
}
public void setPortion(int portion) {
if (portion > 0)
this.portion = portion;
else
System.out.println("Error 002 : please enter a valid positive number.");
}
}
Next, let's try to execute it from another class that hold the public static void main(String... args)
public class exercise {
public static void main(String[] args) {
Integer[] numbers = {1, 2, 3, 4, 5, 6, 7};
int portion = 2;
Shared share = new Shared(portion, numbers);
System.out.println(share.listToChunks());
}
}
Now, if you enter an array of integer [1, 2, 3, 4, 5, 6, 7] with a partition of 2.
the result will be [[1, 2], [3, 4], [5, 6], [7]]
|
fd487a973116fe6d94a69c905ff4cb5d743a1feb56094c189fa9c44e1af362e7 | ['7ac940fd8a3c4945a9de424ef91bf982'] | Is it possible to have an algorithm that has time complexity O(c^n) where c < 1? Every thing I see assumes that the operations grows rapidly. Here is an example of such a chart: http://bigocheatsheet.com/. It really bothers me that not a single introduction that I have seen mention this as a possibility but don't prove it as being impossible (if it is).
| 6cbe1e6f8024ad0d69a2f3dca8351bf5b231f2124dd40e9551476469d44ea6f2 | ['7ac940fd8a3c4945a9de424ef91bf982'] | I have an html form that places text field data into a Javascript array. The code is shown here:http://jsbin.com/maniwu/3/edit?html,js,output.
var message = [];
var receiverInput = document.getElementById("Receiver");
var classificationInput = document.getElementById("Classification");
var titleInput = document.getElementById("Title");
var senderInput = document.getElementById("Sender");
var dateInput = document.getElementById("Date");
var messageBox = document.getElementById("display");
function insert() {
message.push(receiverInput.value);
message.push(classificationInput.value);
message.push(titleInput.value);
message.push(senderInput.value);
message.push(dateInput.value);
clearAndShow();
}
function clearAndShow() {
// Clear our fields
receiverInput.value = "";
classificationInput.value = "";
titleInput.value = "";
senderInput.value = "";
dateInput.value = "";
// Show our output
messageBox.innerHTML = "";
messageBox.innerHTML += "Sent Header " + message + "<br/>";
}
<html>
<body>
<form>
<input id="Receiver" type="text" placeholder="Receiver" />
<input id="Classification" type="text" placeholder="Classification" />
<input id="Title" type="text" placeholder="Title" />
<input id="Sender" type="text" placeholder="Sender" />
<input id="Date" type="text" placeholder="Date" />
<input type="button" value="Save/Show" onclick="insert()" />
</form>
<div id="display"></div>
</body>
</html>
But I want each embedded in Python 2.7 (windows, IDE: spyder) as shown below. How do I get them to communicate?
import js2py
js = ""
"
function classCollection() {
var message = [];
var receiverInput = document.getElementById("Receiver");
var classificationInput = document.getElementById("Classification");
var titleInput = document.getElementById("Title");
var senderInput = document.getElementById("Sender");
var dateInput = document.getElementById("Date");
var messageBox = document.getElementById("display");
function insert() {
message.push(receiverInput.value);
message.push(classificationInput.value);
message.push(titleInput.value);
message.push(senderInput.value);
message.push(dateInput.value);
clearAndShow();
}
function clearAndShow() {
receiverInput.value = "";
classificationInput.value = "";
titleInput.value = "";
senderInput.value = "";
dateInput.value = "";
messageBox.innerHTML = "";
messageBox.innerHTML += "Sent Header " + message + "<br/>";
}
document.write(message)
}
classCollection()
""
".replace("
document.write ", "
return ")
result = js2py.eval_js(js)
print result
import webbrowser f = open('classInformation.html','w') records = """
<html>
<body>
<form>
<input id="Receiver" type="text" placeholder="Receiver" />
<input id="Classification" type="text" placeholder="Classification" />
<input id="Title" type="text" placeholder="Title" />
<input id="Sender" type="text" placeholder="Sender" />
<input id="Date" type="text" placeholder="Date" />
<input type="button" value="Save/Show" onclick="insert()" />
</form>
<div id="display"></div>
</body>
</html>""" f.write(records) f.close() webbrowser.open_new_tab('classInformation.html')
|
5c9ad4983241875187c5181ecdb99a795222c90194a20c5d829603d36ec36fd8 | ['7ace69931781460b8c79a9a8f7e944ee'] | Thank you for your consideration and attention to this matter.
I think that my answers are based on what is the meaning of **true** or **false** in *IELTS True/False/Not Given Question*:
**TRUE** If the statement agrees with the information
**FALSE** If the statement contradicts the information
**NOT GIVEN** if there is no information on this
For instance, the sentence "IF you learn a language at college, listening is easier" doesn't contradict "IF you're learning a language abroad, it's definitely easier". I think that is necessary the option **NOT GIVEN** in this exercise. | 2b3a27bd8ea2e3bf3374b22c08c487aac19bd3052da871c01cfd0d492c1aecd1 | ['7ace69931781460b8c79a9a8f7e944ee'] | So I have this problem:
"40% of our students taking Calc I are freshman while the remainder are sophomores. 70% of sophomores pass Calc I, whereas only 60% of freshmen pass Calc I. If a student passes Calc I, what is the probability that he was a freshman?"
Using conditional probability rules, actually i used a tree diagram, I found the porbability of a student passing the exam to be 66% or .66
However, I'm not sure how to calculate the probability that he was a freshman. I feel like it's simple, I know it's simple, I'm just not thinking of it...
Any help would be greatly appreciated.
|
0e645b96ae6ec62ec66e54a59d8b6349adc30fd3413b8e7f7d7690f041e54680 | ['7aceeb9a2b5d4b649e3612863cc762b6'] | <PERSON> , I really appreciate your help. I actually tried adding BPP and HCRP to the local sdp server, but still non of the devices can detect the RPi as a bluetooth printer, but on windows i there is an "unknown printer" printer in the device manager i couldn't use it in any way. | 332ab8e68ec53126b6935c424f39153cb786d0d63723b9e4d793c1d5b704d52d | ['7aceeb9a2b5d4b649e3612863cc762b6'] | https://dev.mysql.com/doc/refman/5.7/en/replication-features-differing-tables.html describes the supported variations in table definitions.
For one, it appears that this is supported with statement-based replication:
When using statement-based replication, a simple rule of thumb to follow is, “If the statement run on the master would also execute successfully on the slave, it should also replicate successfully”.
With row-based replication, only certain type conversions are supported, which are affected by the slave_type_conversions variable. The key quotes according to my reading are:
[Conversions are supported between] any of the string types CHAR, VARCHAR, and TEXT, including conversions between different widths.
However:
[Row-based] Replication between columns using different character sets is not supported.
|
5dc66487be429bab0ad279c9d60a27b2c1688fedf42beab3d10f4770c95d9301 | ['7ad507f9ddb643c6acc9e869c84549ae'] | You have two options here:
1) Add an implicit class conversion, e.g. RichSearchDefinition, which will allow you to use your own methods when the implicit conversions is in scope. This is known as the "enrich my library" (or sometimes "pimp my library") pattern. The code will look roughly like this:
object Implicits {
implicit class RichSearchDefiniton(sd: SearchDefinition) {
// Define methods here that you'd like to use on `SearchDefinition`
def printSomething: Unit = println("This is an example of enriching a library.")
}
}
Wherever you need this functionality, you can simply import the implicit conversion: import mypackage.Implicits._
2) Make changes to the library locally, change the version number to something like 0.0.1-LOCAL, and use sbt publishLocal to publish a local copy of it. In your project, you can depend on this locally-published library. When you're satisfied that it works, you can submit a pull request with your change. One caveat here is that, if elastic4s is included transitively through another dependency, you'll have to exclude it in your build.sbt file
| b576a8e0078f2b157c7622ce454563b1d53ddff95095db26e48c2a98934949e4 | ['7ad507f9ddb643c6acc9e869c84549ae'] | You're most likely looking for Json.parse, rather than Json.toJson.
import play.api.libs.json.Json
scala> Json.toJson("[]")
res0: play.api.libs.json.JsValue = "[]"
scala> Json.parse("[]")
res1: play.api.libs.json.JsValue = []
Trying to convert res0 to a List[Foo] doesn't work because you're trying to convert the string "[]" rather than than the same string without quotation marks, [].
|
e388da52c4b415d1e0bc2a51aa552ff584b50e64719d8db335ad0453f98909c9 | ['7ad55ce1b672471f803f100214c17b4a'] | From my understanding, PGP supports the generation of a signature from plaintext using the sender's private key. Both the plaintext and the signature are encrypted using the session/symmetric key, and the session/symmetric key is encrypted using the receiver's public key.
I assume the reason the signature is created from the plaintext (aside from ease of logistics) is so this signature can't be removed and replaced with another signature. Is that correct, or is there another reason? By signing before, the receiver runs the security risk of decrypting an unauthenticated message.
| 002c73c2b8a0c71d007924ac8bdb713157a81773d9a36a5aaa1911cd4bbea050 | ['7ad55ce1b672471f803f100214c17b4a'] | Yes we did have this conversation about this issue and where I have mentioned in my question `I got told off by the senior users` I was actually referring to that conversation. I just wanted if there were any alternate ways of doing so or if this option is really off the table.and I have got my answer after listening to all the users here. |
51ca9a5d6ba519d498012abc8a844886b1d31e981a7622582a03aa34a193abc7 | ['7ae42caf7ddf4f47a8dc102dc69503f9'] | I just testing a linked link. However, the list address passed to function GetElement() is not expected after I insert a element to the list and the list should be a reference type. I just can't understand why.
This is my main program:
#include "stdafx.h"
#include <string>
#include <iostream>
typedef struct Node
{
int data;
struct Node *next;
} Node;
typedef struct Node *LinkList;
void InsertElement(LinkList *header, int i, int e)
{
LinkList p = *header;
int j = 0;
while (p && j < i)
{
p = p->next;
j++;
}
if (!p || j > i)
return;
Node newNode;
newNode.data = e;
newNode.next = p->next;
p->next = &newNode;
}
void GetElement(LinkList list, int i, int *value)
{
LinkList p = list->next;
int j = 1;
while (p && j < i)
{
p = p->next;
j++;
}
if (!p || j >= i)
return;
*value = p->data;
}
int _tmain(int argc, _TCHAR* argv[])
{
LinkList header = (LinkList)malloc(sizeof(Node));
header->next = NULL;
InsertElement(&header, 0, 1);
int res = -1;
GetElement(header, 1, &res);
}
When I am debugging, I found the parameter "list" in function GetElement() changed once it enters the function.
| 02d0b186a21abc96a8af62bbcb8f0d73f0b809ceecc5da894286d95f092e955e | ['7ae42caf7ddf4f47a8dc102dc69503f9'] | Seeing a weird issue, when query below table using Java data mapper: "com.datastax.driver.core.exceptions.CodecNotFoundException: Codec not found for requested operation: ['org.apache.cassandra.db.marshal.ByteType' <-> byte]
"
Should CQL tinyint be mapped to byte in Java driver automatically? What is ByteType?
CREATE TABLE abc.test (
cityID int,
planUUID UUID,
versionID TIMEUUID,
status tinyint,
PRIMARY KEY (cityID, planUUID, versionID)
) WITH CLUSTERING ORDER BY (planUUID DESC, versionID DESC);
@Data
@Table(keyspace = "abc", name = "test")
public class TestSet {
@PartitionKey private int cityID;
@ClusteringColumn @NonNull private UUID planUUID;
@ClusteringColumn(1)
private UUID versionID;
private byte status;
}
|
cd8b23873728735dda5df6fd215e4802f0fb1837c5f147e5636a56499ccc3baf | ['7aed206581994797b7ea9d5f4f57545b'] | All efforts to switch on bluetooth are failed. No any traces of bluetooth adapter could be found:
lsusb produces:
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 0bda:58c8 Realtek Semiconductor Corp. Integrated Webcam HD
Bus 001 Device 003: ID 138a:0091 Validity Sensors, Inc. VFS7552 Touch Fingerprint Sensor
Bus 001 Device 002: ID 8087:0a2b Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
dmesg | grep -i bluetooth shows following:
[ 5.881993] Bluetooth: Core ver 2.22
[ 5.882010] Bluetooth: HCI device and connection manager initialized
[ 5.882014] Bluetooth: HCI socket layer initialized
[ 5.882016] Bluetooth: L2CAP socket layer initialized
[ 5.882019] Bluetooth: SCO socket layer initialized
[ 7.943529] Bluetooth: hci0: command 0xfc05 tx timeout
[ 7.943598] Bluetooth: hci0: Reading Intel version information failed (-110)
[ 11.072476] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 11.072478] Bluetooth: BNEP filters: protocol multicast
[ 11.072481] Bluetooth: BNEP socket layer initialized
Intel 8265 driver installed, but has no effect.
Any guru could help me?
| a7f8506293330fa7101b21222377b54c0142cfbd6fd5c63e6f5eee462bf5ef1f | ['7aed206581994797b7ea9d5f4f57545b'] | I am trying to recover a password for my network. It's set up like this: a network of computers, and a central server which authenticates login-passwords entered, and is also a network share. Username looks like administrator@abc. I tried to recover the password hashes from the individual CPUs, they gave this : FAFEA8FAF0D8D61FAAD3B435B51404EE. This decodes to GAGCAU and a null hash after. This password does not work for logging in to the network. Is there a way to recover the password for the network share from a non-admin network account?
Thanks in advance.
|
7035569a4a96381da8b011e6baf7ad8acb2d5036717767f17e6008c9484cdec0 | ['7aed763bd600465c94874681776e8d54'] | I have the following page:
<head runat="server">
<title></title>
<script type="text/javascript">
var current = "";
function Tab(e) {
var evtobj = window.event ? event : e;
var unicode = evtobj.charCode ? e.charCode : evtobj.keyCode;
var targ;
if (evtobj.target) targ = evtobj.target;
else if (evtobj.srcElement) targ = evtobj.srcElement;
if (unicode == 37) {
var elements = document.getElementsByTagName("input");
for (var i = 0; i < elements.length; i++) {
if (elements[i].tabIndex == targ.tabIndex - 1) {
elements[i].focus();
return true;
}
}
}
else if (unicode == 39) {
var elements = document.getElementsByTagName("input");
for (var i = 0; i < elements.length; i++) {
if (elements[i].tabIndex == targ.tabIndex + 1) {
elements[i].focus();
return true;
}
}
}
else {
return true;
}
}
</script>
</head>
<body onkeydown="return Tab(event);">
<form id="form1" runat="server">
<asp:TextBox ID="TextBox1" TabIndex="1" runat="server"></asp:TextBox>
<asp:TextBox ID="TextBox2" TabIndex="2" runat="server"></asp:TextBox>
<asp:TextBox ID="TextBox3" TabIndex="3" runat="server"></asp:TextBox>
<asp:TextBox ID="TextBox4" TabIndex="4" runat="server"></asp:TextBox>
<asp:TextBox ID="TextBox5" TabIndex="5" runat="server"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Button" />
<br />
<asp:TextBox ID="TextBox6" TabIndex="6" runat="server"></asp:TextBox>
<asp:TextBox ID="TextBox7" TabIndex="7" runat="server"></asp:TextBox>
<asp:TextBox ID="TextBox8" TabIndex="8" runat="server"></asp:TextBox>
<asp:TextBox ID="TextBox9" TabIndex="9" runat="server"></asp:TextBox>
<asp:TextBox ID="TextBox10" TabIndex="10" runat="server"></asp:TextBox>
</form>
</body>
It works fine with Right/Left arrows navigation depending on the tab index for each textbox, I need to do the same with the Up/Down arrows, to navigate up and down by setting focus on the textbox above or under the current text box, for example, if focus is on textbox 3 and I press down arrow the focus should move to textbox 8 as it's under it, and vis versa.
| 8f4a527502ac581f4310837ca9ce695877cb904230bcdae0bf2597df14bb7ae6 | ['7aed763bd600465c94874681776e8d54'] | I have the following code:
TextBox3.Text = "FD&C Yellow No 6 /E110 Sunset Yellow Lake 35";
cmd.CommandText = "SELECT S.Qty AS Qty, S.Units, S.Packing, S.Lot, S.Price, S.PackSize, S.Location FROM Product P, Stock S, Lot L WHERE P.Product = L.ProductID and S.Lot=L.Lot and P.Product = @Pro ;";
cmd.Parameters.AddWithValue("@Pro", TextBox3.Text);
The query is not getting values although it should do. This problem happens because the text is long because it works with shorter texts even though they have the same special characters like & /.
How can I solve this problem?
|
2d327a3a415bb748338e1e7cd49a7499df9dd6618d12a97bca69dc74b1e6224d | ['7b0020379ed64479b6848140c6c742b3'] | I want set up a local web server to be used in my office. It will be made online in future (~1 or 2 years) but for now it is locally used. I have gone through some tutorials (here) to set up a LAMP web server. The usage is expected to be as follows
Used for: Drupal Web Applications
Current Users: 15
Prospected Users (in a year): 60 (some over internet)
Files upload/download: min. 10 files daily per user
I do need constant back of all my data on server
What should be the server hardware specifications for my scenario? Do I really need to have SSD for fast IO operations or should I go for RAID? How much RAM? What about network card? Please it would be really helpful if anyone can point to a articles that explains these specifics.
| 02f93136158efdf19f5e40ea9aa8648564009bb210fda5d8e2d55afaabe5d1c3 | ['7b0020379ed64479b6848140c6c742b3'] | SELECT
@@SERVERNAME AS ServerName,
CASE WHEN LEFT(CAST(serverproperty('productversion') as char), 1) = 9 THEN '2005'
WHEN LEFT(CAST(serverproperty('productversion') as char), 2) = 10 THEN '2008'
WHEN LEFT(CAST(serverproperty('productversion') as char), 2) = 11 THEN '2012'
END AS MajorVersion,
SERVERPROPERTY ('productlevel') AS MinorVersion,
SERVERPROPERTY('productversion') AS FullVersion,
SERVERPROPERTY ('edition') AS Edition
|
6b7e8f8ba77c6cfd1e863e6426fcc0d935af534aaddfa34b39302a7eceef29a6 | ['7b02eaef4c2a453bbac677252c5e3fd0'] | Skipping a step is not supported by default in BasicWizardLayout. You'd have to either sub-class it and use the API method Wizard#setCurrentStep, or write your own wizard layout class by sub-classing WizardFragment as explained here.
void org.codepond.wizardroid.Wizard.setCurrentStep ( int
stepPosition )
Sets the current step of the wizard
Parameters
stepPosition the position of the step within the WizardFlow
| ae408df205a33664012d8587b8622986794d48b27930517da76a6238ba13c849 | ['7b02eaef4c2a453bbac677252c5e3fd0'] | I used the same code from: http://nashruddin.com/PHP_Script_for_Converting_Relative_to_Absolute_URL
but I modified It a little bit so If base url contains PORT number it returns the relative URL with port number in it.
function rel2abs($rel, $base)
{
/* return if already absolute URL */
if (parse_url($rel, PHP_URL_SCHEME) != '') return $rel;
/* queries and anchors */
if ($rel[0]=='#' || $rel[0]=='?') return $base.$rel;
/* parse base URL and convert to local variables:
$scheme, $host, $path */
extract(parse_url($base));
/* remove non-directory element from path */
$path = preg_replace('#/[^/]*$#', '', $path);
/* destroy path if relative url points to root */
if ($rel[0] == '/') $path = '';
/* dirty absolute URL // with port number if exists */
if (parse_url($base, PHP_URL_PORT) != ''){
$abs = "$host:".parse_url($base, PHP_URL_PORT)."$path/$rel";
}else{
$abs = "$host$path/$rel";
}
/* replace '//' or '/./' or '/foo/../' with '/' */
$re = array('#(/\.?/)#', '#/(?!\.\.)[^/]+/\.\./#');
for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) {}
/* absolute URL is ready! */
return $scheme.'://'.$abs;
}
Hope this helps someone!
|
2311cb3e47bb96b5dcfa705075f4891857970d474287c49052950a22fe333a9f | ['7b08167b53754ceb82ea579159e4aad1'] | Remember that topoloy can be though of as the study of "stretching without tearing" and then it is common to identify two spaces when one can be deformed into the other (ie homeomorphism). Anyhow, suppose you've got a circle made of super strecthy material, then you can stretch it, without tearing, into a rectangle; and vice versa. Now if you've got an open set which is just the Union of a bunch of open circles and you know how to deform the circles into rectangles, then that open set is also a union of a bunch of open rectangles. :-) hope that helps!
| c2759cc32953d3b334e972c2045ce60beb1ea9d575f03a37d149604f3e6862b4 | ['7b08167b53754ceb82ea579159e4aad1'] |
The colon “:” generally abbreviates a pair of equalities.
A category is generally defined as consisting of things called ‘objects’ and
‘morphisms’ --as well as other things--
such that:
Each morphism $f$ has an associated “source” object and an associated “target” object.
To avoid being verbose, a syntactic construct is introduced:
$$
f : A → B \qquad≡\qquad \mathsf{source}\,f \,=\, A \;\;\land\;\; \mathsf{target}\,f \,=\, B
$$
Hope that helps :-)
|
1fdf508328338d32a5e06975c1e84b348d4c5245a1c68df7360a7fe775d0b91c | ['7b232bf8ebe847cc9ef443f097ff0536'] | You have to use a unique key for the input component.
<input key="random1" type="text" name="displayName" />
The key="random1" cannot be randomly generated.
For example,
<div key={uuid()} className='scp-ren-row'>
uuid() will generate a new set of string for each rerender. This will cause the input to lose focus.
If the elements are generated within a .map() function, use the index to be part of the key.
{rens.map((ren,i)=>{
return(
<div key={`ren${i+1}`} className='scp-ren-row'>
{ren}{i}
</div>)
}
This will solve the issue.
| 7d08258b315954c4287ffd689ebb900232db91a403a0f1a3f20f9582d708d5a0 | ['7b232bf8ebe847cc9ef443f097ff0536'] | The Problem is with the uplines.push.
I always get an empty uplines array so the last part of the code doesn't run. The promises resolve later and I get the correct data. May I know how to go about doing it the correct way?
const getAllUplines = async () => {
uplines = [];
const findUser = async (userFid) => {
const userDoc = await firestore.collection("users").doc(userFid).get();
if (userDoc.exists) {
const user = { ...userDoc.data(), id: userDoc.id };
console.log(user);
uplines.push(user);
if (user.immediateUplineFid) {
findUser(user.immediateUplineFid); //self looping
}
} else {
console.log("No User Found");
return null;
}
};
sale.rens.forEach(async (ren) => {
findUser(ren.userFid);
});
console.log(uplines);
return uplines;
};
let uplines = await getAllUplines();
console.log(uplines);
uplines = uplines.filter(
(v, i) => uplines.findIndex((index) => index === v) === i
); //remove duplicates
uplines.forEach((user) => {
if (user.chatId) {
sendTelegramMessage(user.chatId, saleToDisplay, currentUser.displayName);
console.log("Telegram Message Sent to " + user.displayName);
} else {
console.log(user.displayName + " has no chatId");
}
});
|
0101364fb2f77ea44b7b1370abe62fe0b16562a29809fc48ac3732913be5ee0f | ['7b23f299a7af40c3a43a7afad0b2546f'] | "Primary script unknown" is caused by SELinux security context.
client get the response
File not found.
nginx error.log has the following error message
*19 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream
so just change security context type of web root folder to httpd_sys_content_t
chcon -R -t httpd_sys_content_t /var/www/show
there are 3 users for nginx/php-fpm config
/etc/nginx/nginx.conf
user nobody nobody; ### `user-1`, this is the user run nginx woker process
...
include servers/*.conf;
/etc/nginx/servers/www.conf
location ~ \.php$ {
# fastcgi_pass <IP_ADDRESS>:9000; # tcp socket
fastcgi_pass unix:/var/run/php-fpm/fpm-www.sock; # unix socket
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
/etc/php-fpm.d/www.conf
[www]
user = apache ### `user-2`, this is the user run php-fpm pool process
user = apache
;listen = <IP_ADDRESS>:9000 # tcp socket
listen = /var/run/php-fpm/fpm-www.sock # unix socket
listen.onwer = nobody ### `user-3`, this is the user for unix socket, like /var/run/php-fpm/fpm-www.sock
listen.group = nobody # for tcp socket, these lines can be commented
listen.mode = 0660
user-1 and user-2 is not necessary to be the same.
for unix socket, user-1 need to be the same as user-3,
as nginx fastcgi_pass must have read/write permission on the unix socket.
otherwise nginx will get 502 Bad Gateway, and nginx error.log has the following error message
*36 connect() to unix:/var/run/php-fpm/fpm-www.sock failed (13: Permission denied) while connecting to upstream
| 6e11a8386bf6f50eb8ec8e3072e70259169cfa7d19cb14c4fd70dda63468cfb0 | ['7b23f299a7af40c3a43a7afad0b2546f'] | maybe your csv file encoding is not same as mysql character set, this will also lead to "ERROR 1406 (22001): Data too long for column 'vendor' at row 1".
for example, if you mysql character set is GBK, while you csv file is encoded in UTF-8, then it will lead to the same error when load.
just change you file encoding to the same as mysql character set.
|
2fca513fb2daee0ecb067ac3a843454a9fb7efc6c83f5c71fb3bb8ec98d642c0 | ['7b3544716bc149578ef4b6be866ddc33'] |
that I might leave and wants me to stay another 6 month to finish a
project (one that I barely started).
Given that you've barely started this project, the 6 months deadline is probably going to end up being 12 months or 24 months instead.
Start interviewing with external employers as well. Since there is little you can do to control the internal political system of your company, you must plan for the worst.
| cf676afd636716bc8f7f7b173014df5ff3ed9babc54dd5cb8dcc38eb4c9ac4c8 | ['7b3544716bc149578ef4b6be866ddc33'] | You could just tell him to dress up a little. That being said since you said "Cheers", you must not be from the US. I am in Silicon Valley and this kind of thing is common place. At UC Berkeley, my semi-famous Professor and Computer Science Undergraduate Director used to show up in his sandals and would take them off and would lecture barefoot. |
a103a0cf3f5826a8fb9b2e08daabc1e066d2e7354589ab96cb64cea8d96b8d9b | ['7b4d46fc2f184c61af73a6bbe8789029'] | I'm Using Magneto CMS, and I want to add a custom Super category like the following screenshot.
the screenshot shows a product in my site and its super category (Favorite and Quick view)
Actually I can disable any one of them, add another from the provided super categories allowed by the theme but I want to add my custom one
| 4198928f298d04f5bbc5ca93466022dfb566ba37857aef1097e71f256b2081b0 | ['7b4d46fc2f184c61af73a6bbe8789029'] | you can do by using query string with google script and get the entry id to give a value.
the best practice "and the easiest way"
go to the form edit page ..click responses tab and choose Get pre-filled URL. submit an option and you will be redirected to a page with the value link.
|
140000f6155dd0fa089d405f522fcb5fb1ef004a980c7e8325fca13c1b84d787 | ['7b5e87c5f8844e1f8d4526e23ad28164'] | You just need to do that:
labels: {
formatter: function() {
return abbrNum(this.value,2); // Need to call the function for each value shown by the chart
}
},
Here is the Function used to transform the data to be inserted on javascript:
function abbrNum(number, decPlaces) {
// 2 decimal places => 100, 3 => 1000, etc
decPlaces = Math.pow(10,decPlaces);
// Enumerate number abbreviations
var abbrev = [ "k", "m", "b", "t" ];
// Go through the array backwards, so we do the largest first
for (var i=abbrev.length-1; i>=0; i--) {
// Convert array index to "1000", "1000000", etc
var size = Math.pow(10,(i+1)*3);
// If the number is bigger or equal do the abbreviation
if(size <= number) {
// Here, we multiply by decPlaces, round, and then divide by decPlaces.
// This gives us nice rounding to a particular decimal place.
number = Math.round(number*decPlaces/size)/decPlaces;
// Handle special case where we round up to the next abbreviation
if((number == 1000) && (i < abbrev.length - 1)) {
number = 1;
i++;
}
// Add the letter for the abbreviation
number += abbrev[i];
// We are done... stop
break;
}
}
return number;
}
Hope this works =)
| 467be990a15cf574e526ab9eb6b65da7e17ed4e3141c0e5eaeaf9231cab13fcd | ['7b5e87c5f8844e1f8d4526e23ad28164'] | I have a suggestion for you buddy, a better practice on SQL says to use SEQUENCE, and guess what, it´s VERY easy to do it man, just copy and paste mine:
CREATE SEQUENCE SEQ_TABLEA AS INTEGER
START WITH 1
INCREMENT BY 1
MAXVALUE <PHONE_NUMBER>
MINVALUE 1
NO CYCLE
and use like this:
INSERT INTO TableA (PK,CustNo) VALUES (SEQ_TABLEA.NEXTVAL,123)
Hope this tip able to help ya!
|
bc06d85a945b38f4aabcb70d232a2d5005478e411ce40b7dfb7366182c5738f0 | ['7b813c33037b42cc97a628f8959cbcc9'] | According to the date of this question which belongs to 6 months ago, I think it's resolved now anyhow! But I just try to share my similar experience.
For my case, the hosting company had some update and migration. In
their new configuration, the Permission/Ownership of the WordPress
directory did not match with the new web server configuration.
I had to change all the permissions of files to 644 and I had to make sure all the directory got 755.
You should have 'root' access to the server or ask your hosting company to fix it. Also, it's better to check this post as well.
| 559065b7196a65f470d8f49c083434572d2f65350e57fa5c0f657e7f1accf319 | ['7b813c33037b42cc97a628f8959cbcc9'] | It's so crazy and simple! I faced with it, too.
If you're putting 200 or 1 as the status, just replace it with 'ok' with lowercase! just it.
PS:
You may used Laravel package like irazasyed. If yes, I'm sure about the answer. Because they wrote it with 200 instead of lowercase 'ok'!
|
4624597c8ff1079c2182a788b9a019b35935e8953e9c22d07d94599b15c65ed7 | ['7b86e89322dd4f19838ab5cdc0bb5c0c'] | I only set the num columns in properties of a GridView. Nowhere to set the number of items
I google but only got some questions about how to fix the rows of GridView. I looking for in API GridView also, but there is no function to do that.
Someone teach me? Thanks
| 3a5f5351647d3e6be6d29c968fec3e8ca6a82b098f268742eb7ae48c03a32427 | ['7b86e89322dd4f19838ab5cdc0bb5c0c'] | I want to make an effect when changing an item in GridView. Particularly, I click an item (e.g: a green circle) -> an intermediate item (an green eclipse) -> final item (a black circle)
Now, I can change from green circle to black. Someone could teach me how to do this?
Thanks.
|
24e3f491de4e5536453c8e0cc7b326f3a0c73fbe68c0fda3afba493124c54150 | ['7b94c81c44df4fd3bab66ab4ac5ee853'] | I am trying to pass a class as a template parameter. But this class has only one mandatory constructor where we have to pass an integer value. So I am trying to find a way to initialize the template's constructor parameter.
#include <iostream>
template <class F>
class Class1 {
public:
int i = 0;
F f;
Class1() { i = f.u; }
};
class Class2 {
public:
int u = 5;
Class2(int j) { u = j; }
};
int main() {
Class1 <Class2>c;
std<IP_ADDRESS>cout << c.i << std<IP_ADDRESS>endl;
}
Of course, this gives me an error "Class2 no appropriate default constructor available". Saying that I want to pass different classes with constructors that does not have the same number of parameters in Class1's template , is there a way to initialize the template's constructor? I'm looking for something like Class1 c;
| 5dbdfccff20a4c622d8e92845f559d4bf86d79bbbdeff76fcd7c94ab75fce275 | ['7b94c81c44df4fd3bab66ab4ac5ee853'] | I tried to create a class with an enum, and a function that returns a variable of this enum. But I ran into a problem:
This works:
class SizeBoxClass {
public:
enum BoxType{xBox, yBox};
BoxType intersects() {
return xBox;
}
}SizeBox;
But this does not:
class SizeBoxClass {
public:
BoxType intersects() {
return xBox;
}
enum BoxType { xBox, yBox };
}SizeBox;
I get "BoxType is undefined" at the line of the function declaration...
Why? I thought declaring a class member after its use was not a problem.
|
b4538ca1c79de0b119d13b4d9cbbcef242d03bfe680daa59eddd18932079aaa7 | ['7b96cfe755f04b05b880f6f3d2ad2fcf'] | As <PERSON> so eloquently states, this is quite a muddle you've created. He's correct in stating that the IDE inserts a line in the project file that automatically creates your forms for you. So creating it yourself is redundant.
The OnShow handler is probably the correct place to add some test data to the grid in this instance, but I wouldn't bother with the TTest class to do it. That is, get the logic working first, then move the stuff into another class if you want. I suggest this because it appears you don't have a very good grasp of how to do OOD. We were all there at one time! Simplify things first.
I did a video for CodeRage 9 that you might find interesting. It's called "Have You Embraced Your Inner Software Plumber Lately?" Search for it on YouTube. It'll give you some insight into this general topic (maybe too much).
| c7a64e3aac7ebbadcd0b451a0d59093ed989461031b627bc20c84b9484632e8d | ['7b96cfe755f04b05b880f6f3d2ad2fcf'] | I'd set this up where the non-modal form (Form3) is opened from the main form (Form1). That way, there's no question about its parentage. I'd put a method into Form2 that's initialized from Form1 after it creates Form2 but before it calls ShowModal that Form2 uses to open Form3. Include any parameters in the call that Form2 needs to pass into Form3.
This approach eliminates the explicit circular reference between Form1 and Form2 and keeps Form3 independent of Form2.
|
6a32ae02d801f9522b989226cec5c1f2532f47263e2c7f1fc71e0f68493e4ad5 | ['7b9cf53be28947c9aedc934593f5cf7c'] | <PERSON>! 1) Yes, I was asking about S-vN in this context. 2) I thought there were subtleties when the Hamiltonian depended on time. I'd have to rethink it. I barely remember it was related to the possibility of changing the hamiltonian through explicitly time-dependent canonical transformations. For example, if I remember correctly, a Klein-Gordon field in a Friedman-Robertson spacetime is related to a Klein-Gordon field with a time-dependent mass in <PERSON> space through a canonical transformation. | 239ab84312b2596b94fc910110fb52e96f083a6a9ec6907dbd07387dc7a69fd2 | ['7b9cf53be28947c9aedc934593f5cf7c'] | I am looking to use a natural language parsing library for a simple chat bot. I can get the Parts of Speech tags, but I always wonder. What do you do with the POS. If I know the parts of the speech, what then?
I guess it would help with the responses. But what data structures and architecture could I use.
|
c3c43645757b66010b0cb7d7f7aab017e11f0b7e06e190f38d855ed5786c2b91 | ['7bba903658a248f9b64b14ac550a93fd'] | First, an example of what I require from my function. An array of students is passed to the function, and the function returns an array with each student's top score as items.
getStudentTopScores([
{
id: 1,
name: "<PERSON>",
scores: [5, 3, 4, 2, 5, 5]
},
{
id: 2,
name: "<PERSON>",
scores: [2, 3, 3, 3, 2, 5]
},
{
id: 3,
name: "<PERSON>",
scores: [2, 2, 4, 4, 3, 3]
}
]) ➞ [5, 5, 4]
Below is my working function. I need some help explaining exactly why it works.
const getStudentTopScores=students=>
students
.map(student=>student.scores)
.reduce((arr,scores)=>{
const score = scores.length?Math.max(...scores):0;
arr.push(score);
return arr;
},[]);
So, what is going on with my code?
An array of students is passed to the function getStudentTopScores
The .map() method is applied to the array:
.map(student=>student.scores)
I think that this is accessing the scores array stored inside students.
the .reduce() method is applied to each score. This takes each score and asks: is this score the maximum score in the array? If the answer is yes, then that value is stored in score, if the answer is no, then 0 is stored in score.
the value stored in score is added to the accumulator (arr).
That value is the particular students top score.
What if there are multiple scores that are equal and maximum? Why aren't these all added to the accumulator, creating a value that is the sum of all the top scores for that individual?
The code only works with an empty array at the end. I've no idea why this is needed. Please explain this.
| 3d79eb08e8c6315c1050d47518b2fcf14bbed80f5bdb72571595a6b9c7935f40 | ['7bba903658a248f9b64b14ac550a93fd'] | I am tracking numbers of miles run, for a sequence of long-distance runs. I want to count the number of times progress is made (i.e. the number of times a logged distance exceeded the previously logged distance).
I am convinced that the .every() method will be useful to me here. I need a counter, which increases by one every time it finds an item that was greater than the previous item. It is this last bit of functional logic that I cannot generate myself.
const progressDays = (runs) => {
return runs.reduce(aFunc, 0)
}
const aFunc = (total, num) => {
//the logic I need goes here
}
}
console.log(progressDays([3, 4, 1, 2]))
I would expect the output of the above code to be 2, because on 2 occasions (3->4) and (1->2) progress was made.
|
116073c574701f564b9786d3f8dabf8e7abb189e4469495a44682c76a8136595 | ['7bc09c42a01b410ba7f4c7c9d0722bb5'] | I can understand that the Recovery Tools may not change. However, what about a reinstall using the recovery disk? Will it install the version when the disk was created, or will the latest version be downloaded? Or am I better off creating an installation disk of the latest version and doing an install with that. FWIW I will be doing a clean install i.e. wiping the HDD completely. | 2e225928b1f6659e3ea8176ebf7767d81550fc9daef406813a4ef0f27edf66e3 | ['7bc09c42a01b410ba7f4c7c9d0722bb5'] | To answer my own question,I will quote Microsoft from this linkCreate a recovery drive:
It's a good idea to create a recovery drive. That way, if your PC ever experiences a major issue such as hardware failure, you'll be able to use the recovery drive to reinstall Windows 10. Windows updates to improve security and PC performance periodically so it is recommended to recreate the recovery drive annually. Personal files and any applications that did not come with your PC will not be backed up. You'll need a USB drive that's at least 16 gigabytes.
|
7c4d07a63d4819dbf6283de2dc99137b358f5cb38e952e045a0204ade6397705 | ['7bc7672a59c34d07ba7be8341a640a03'] | I have this website: https://acanhs.org I want the slide show at the beginning to be at full width on all devices. What can I add to make that happen?
My html:
<div class="w3-content w3-section responsive">
<div class="mySlides w3-animate-top responsive" style="--background-image: url('homepagepictures/81463156_472179973704673_8295529433598935850_n(1).jpg')" >
</div>
<div class="mySlides w3-animate-bottom responsive" style="--background-image: url('homepagepictures/097f1e08-ebfe-434a-bc68-8020d02cee6e.JPG')">
</div>
<div class="mySlides w3-animate-top responsive" style="--background-image: url('homepagepictures/8291878a-b5ad-4003-8cc6-de7baafd84a0.JPG')">
</div>
<div class="mySlides w3-animate-bottom responsive" style="--background-image: url('homepagepictures/27890996_211176766129569_6923967286697000960_n.jpg')">
</div>
<div class="mySlides w3-animate-top responsive" style="--background-image: url('homepagepictures/42914143_364663130939605_1259772328364992140_n.jpg')">
</div>
<div class="mySlides w3-animate-bottom responsive" style="--background-image: url('homepagepictures/42947322_373232869884042_7326776160519321694_n.jpg')">
</div>
<div class="mySlides w3-animate-top responsive" style="--background-image: url('homepagepictures/44689929_944494762409958_8911408401400786089_n.jpg')">
</div>
<div class="mySlides w3-animate-bottom responsive" style="--background-image: url('homepagepictures/fd2b6c09-19b7-42ad-b7fb-bce6dc983690.JPG')">
</div>
<div class="mySlides w3-animate-top responsive" style="--background-image: url('homepagepictures/IMG_6922.jpg')">
</div>
<div class="mySlides w3-animate-bottom responsive" style="--background-image: url('homepagepictures/IMG_6932.jpg')" >
</div>
</div>
My javascript:
var myIndex = 0;
carousel();
function carousel() {
var i;
var x = document.getElementsByClassName("mySlides");
for (i = 0; i < x.length; i++) {
x[i].style.display = "none";
}
myIndex++;
if (myIndex > x.length) {myIndex = 1}
x[myIndex-1].style.display = "block";
setTimeout(carousel, 5000);
}
I have tried a lot of stuff but I'm new to web development so it's most likely a mistake on my end.
| e8d803330ab36bfe2c3225ecfd34a01c9691916e4989023760a4570370cc43eb | ['7bc7672a59c34d07ba7be8341a640a03'] | I have this code
<h1 class="Welcome" style="background-color: #F0E68C;" style="margin-left: 20px;" style="margin-right: 20px;" style="margin-top: 100%;">Welcome To The National </h1>
<h1 class="Welcome" style="background-color: #F0E68C;" style="margin-left: 20px;" style="margin-right: 20px;" style="margin-top: 100%;">Honor Society Website!</h1>
It should add a background just behind the text but instead it looks like this how can I make it so that both texts have the same background but not take up the entire page and have no white space between the lines.
|
6c94bdba894741283e07e10720c85b1dd2c39a8d503ab52a65ac2d554860762c | ['7bcaf18e99f54299b5b8a27b61fea80c'] | I use a modalService ie. NgbModal to submit the Form on server. This form is having like 50 to 60 fields.
When the form is submitted multiple times then after few submissions the website becomes extremely slow - like unable to type anything, dropdown does not show up etc.
The issue has only been with modals, if same form submitted on pages then this works fine.
I have tried debugging the code using Augury but I believe Augury does not show up the entryComponents
This is how the modal is open.
const modalRef = this.modalService.open(AddOrderComponent,this.modalOption).componentInstance;
//Closed.
activeModal.dismiss('Close click')
| e87173d5b9de46a801a953e9355ceee14be020b99d2b652f74fd9c79e0dabc34 | ['7bcaf18e99f54299b5b8a27b61fea80c'] | I have a Git repo with 2 branches - branch_a, branch_b
branch_a holds new.php
branch_b holds app.html
Now, I need to deploy code on server for CI/CD using Gitlab.
Technically I want to merge these 2 branches into one another branch - develop into 2 folders - backend and frontend
-develop
--backend -> new.php (from branch_a)
--frontend -> app.html (from branch_a)
Now, is this something achievable / suggested approach?
|
9687f8f16f89ffa695ad7c149d92cb393e42c4e757ad66e785b69ac248a417ef | ['7be7286619474491ab51bcf19d3694c7'] | Thanks. After spending some time (too much time) on this, I've decided to simply stick with "Single Article", and try to remember to change the selection of the article whenever a new article is created. This has the advantage of easy selection of things like showing creation date or not. | 929786793608c5c105d5eae634c902d8b008443b649085c00e8ab4b922888d9a | ['7be7286619474491ab51bcf19d3694c7'] | I'm trying to set up a multilingual site for Danish and English (US) languages. I've turned on the option "Remove URL Language Code" in the Language Filter plugin. This does remove the "da" codes from the Danish page URLs, but the English page URLs still contain "en".
Danish is set as the default language.
I've renamed the URL language code for US English from "en-us" to just "en". I tried renaming it back again, but that didn't help.
The site is running on IIS, if that's relevant.
Here's the URL: http://modesty.dk/
|
b082dc69c4d7a4384f8953dee2dcf17612d6c581f2a5ee15729ccdbef44de740 | ['7be843e4b133471b828945be1aaaf153'] | Thank you very much. I got to create a tiff file but it is unreadable now. I populated separate rgb bands and then populated them from separate rgb arrays. But I think that I'm not writing the actual driver correctly. I don't understand how the driver gets the bands. | bd0e15b1c5373fe0f7d1e66cfab164046604f314ee3b42c712def0154dfbb6f8 | ['7be843e4b133471b828945be1aaaf153'] | The raster I'm outputting is a [normalmap](https://en.wikipedia.org/wiki/Normal_mapping) for another program. The channels matter very much, and I need to use georeferenced coordinates. I found this [documentation about designating specific color-types](http://www.gdal.org/gdal_8h.html#a18d4e3dfbc97c1fddab692eabb3c5a24) but I'm unsure how to assign this data to the driver? |
1f006934660ee47fc9f83bdab62147c2d8305e52bd2ec8bcb5e00165ae5ba821 | ['7bf40f98c75144cf841d5e4baf155d20'] | Since I was running out of options, I followed what was suggested by @user944849 and updated Maven to version 3.3.9 and my JDK to 1.8.0_60, but kept source and target on the compiler configuration of the POM pointing to 1.6.
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
After that, module 3 began to compile, but modules 4 and 5 broke due to dependencies on some JRockit libs. To fix that, I ended up updating the deprecated code and the project finally fully compiled.
So I believe there was a problem on the Maven version I was using. Somehow it seems to get lost when 2 projects depended on the same lib and one of them depended on the other. I haven't tested other versions, but the 3.3.9 works fine for these cases.
| a252fa5d86fea5ee285d6ad6aea034a9f2eca5b0e175441442edc55516ea4679 | ['7bf40f98c75144cf841d5e4baf155d20'] | You should declare a String attribute outside of the onCreate method. For example:
private String appleMessage;
Then, inside your onCreate, simply change this line:
appleMessage = appleData.getString("appleMessage");
When you want to use it on other method, just call it. Its value will be the value setted on the onCreated method.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.