问题解答DPST1091 CSpotify

DPST1091 21T1 - Assignment 2 - CSpotify
Assignment 2 - CSpotify
Introduction
We consider music streaming to be a normal thing that we use regularly . . . but it wasn't always this way. In the late 1990s, a new file format
called the MP3 appeared. Its ability to compress audio coupled with the rise of the internet lead to a new era in the music industry. Napster
(and a new generation of music pirates) brought this into the spotlight when they launched in 1999.
Nowadays, with services like Spotify, we have access to a massive library of music (and other audio) content from nearly any device with an
internet connection.
In this assignment, you'll be looking at some of the coding work that goes into organisation of music with things like song information,
playlists and personal music libraries. CSpotify is our implementation of a song library using linked lists as the primary data structure.
Your Goal
The assignment is divided into two parts:
Part A - Implementation (5 Stages)
Your task here is to write the functions that will manage your music Library of Playlists which contain Tracks. All of these functions
are contained inside the file cspotify.c.
Part B - Testing
Your task here is to write functions in test_cspotify.c to check that your code works.
Please note that you do not need to scan in any inputs from the user, this is already completed for you in the given starter code.
The Overall Picture - Your Library
The Library is the overall struct which contains all the objects you will need for the assignment. The Library contains a list of Playlists. In
each of the Playlists, there is a list of Tracks. At the start of the program, the Library starts off as an empty Library containing no
Playlists and hence no Tracks.
As you progress through Stage 1 of the assignment to manage Playlists to your Library, your Library might start to look like this, where
there are Playlists in the Library but not Tracks in any of the Playlists:
Note: You should refer to cspotify.h for more technical and detailed instructions in regards to each function’s implementation.
2021/3/30 DPST1091 21T1 - Assignment 2 - CSpotify
https://cgi.cse.unsw.edu.au/~... 2/13
Stage 2 will then allow you to navigate around your Library Playlists and add Tracks to each Library, resulting in a Library that could look
like this:
Each Track will store information about the title, artist and the trackLength in addition to a next pointer.
Stage 3 will focus on removing certain objects from your Library.
Stage 4 and 5 will be more challenging manipulations of your Library.
The assignment breaks up the above further into smaller tasks to help you build and navigate around your Library. It is strongly
recommended that o begin from Stage 1 and progress in the gi en order
2021/3/30 DPST1091 21T1 - Assignment 2 - CSpotify
https://cgi.cse.unsw.edu.au/~... 3/13
recommended that you begin from Stage 1 and progress in the given order.
Getting Started
Starter Code
The starter code consists of the following files:
main.c contains the main function for the assignment. It will scan the program's input, then call the functions you will write.
You must not change this file.
cspotify.h contains the definitions of all the functions you will be writing. It also contains useful constants and type definitions.
You must not change this file.
cspotify.c contains empty functions which you will need to implement. It already contains some functions. It is strongly recommended that
you use these.
This file is where you will write your own code.
test_main.c contains a main function and other functions that allow you to run the tests you create in test_cspotify.c.
You must not change this file.
test_cspotify.h contains the prototypes of the testing functions in test_cspotify.c.
You must not change this file.
test_cspotify.c contains an alternative main function as well as template code that you will modify to make your own tests.
This file is where you will write your own test cases.
capture.h contains the definition of a function that allows you to capture the output of your own code, to use in testing. It can only be used
in test_cspotify.c, and will not be available in cspotify.c .
You must not change this file.
capture.c contains the implementation of functions that allow you to capture the output of your own code, to use in testing.
You must not change this file.
To run your code interactively, you should use the command:
$ dcc -o cspotify cspotify.c main.c
$ ./cspotify
To run your tests (written in test_cspotify.c), you should use the command:
$ dcc -o test_cspotify cspotify.c test_cspotify.c capture.c test_main.c
$ ./test_cspotify
Allowed C Features
In this assignment, there are two restrictions on C Features:
You must follow the rules explained in the Style Guide.
You may not use the function fnmatch, or import fnmatch.h.
It is recommended to only use features that have been taught in DP1091. Course work in Week 8, 9 and some of Week 10 will have a
particular focus on assistance for this assignment and you will not need any of the subject material from Weeks 11 or 12.
If you choose to disregard this advice, you must still follow the Style Guide. You also may be unable to get help from course staff if you use
features not taught in DP1091.
Reference Implementation
If you have questions about what behaviour your program should exhibit, we have provided a sample solution for you to use.
$ 1091 cspotify
Download the starter code (cspotify.zip) here or copy it to your CSE account using the following command:
$ 1091 setup_cspotify
2021/3/30 DPST1091 21T1 - Assignment 2 - CSpotify
https://cgi.cse.unsw.edu.au/~... 4/13
Stage One
When you execute your program, you can assume that the Library has already been created for you to perform the following operations.
Stage 1 involves managing the Playlists in your Library as well as printing out the state of the Library. You will need to implement or
modify the following functions:
create_library (This is already implemented for you, you may need to modify it)
add_playlist
print_library
rename_playlist
Add a playlist
In cspotify.c you have been given the function stub (a stub is an unimplemented function):
// Add a new Playlist to the Library.
int add_playlist(Library library, char playlistName[MAX_LEN]) {
return SUCCESS;
}
This function will be given a Library and a Playlist name. You will need to insert a new Playlist node at the end of the linked list of
Playlists in the Library. If the Library has no Playlists, your new Playlist will become the first Playlist in the Library. If this is the case,
you will need to make this Playlist “selected”.
You can assume you will never receive a Playlist name which already exists in the Library
You may receive invalid inputs so the function will return either:
ERROR_INVALID_INPUTS if the given Playlist name is invalid (i.e. not alphanumeric).
SUCCESS if a new Playlist is successfully added.
You will need to create a Playlist node (using malloc) before it is inserted into the Library.
Please note that until you implement the next function in this stage for printing out the Library, you will not be able to see whether your
Playlist has been added successfully into the Library.
Print Out the Library
In cspotify.c you have been given the function stub (a stub is an unimplemented function):
// Print out the Library.
void print_library(Library library) {
}
You will need to use the following helper functions already provided to you in the same file: print_playlist, print_selected_playlist and
print_track.
This function will be given a Library. The function should go through each Playlist in the Library and print out the information in the order
they are in inside the Library. You should use the above helper functions to print the Library out, instead of calling printf yourself. Note
that the word static on these functions will make that function only accessible in the current file. We often use static on helper functions
that are not part of the header file and aren't used by any other parts of the program. static will not significantly change how you will use or
define this function.
Command: A
Example: A RoadTrip
Description: Adds a new Playlist named "Roadtrip" at the end of the Library of Playlists.
The message which appears right after running any command simply acknowledges the function has been called and/or depends on
your return values. It does not necessarily indicate the success of your implementation of this function.
Command: P
Example: P
Description: Prints out the Library.
2021/3/30 DPST1091 21T1 - Assignment 2 - CSpotify
https://cgi.cse.unsw.edu.au/~... 5/13
You may see that both print_playlist and print_selected_playlist above take in an int number, this is the position in which they are in in
the Library of Playlists assuming that the first Playlist is at position 0.
The function should not return anything.
At this stage, you will only need to use print_playlist and print_selected_playlist to help you print out information in the Library.
print_track is not needed until Stage 2 has been implemented. After implementing stage 2, you should come back and make sure that the
Tracks in each Playlist are also printed out.
Rename a Playlist
In cspotify.c you have been given the function stub (a stub is an unimplemented function):
// Rename the name of an existing Playlist.
int rename_playlist(Library library, char playlistName[MAX_LEN],
char newPlaylistName[MAX_LEN]) {
return SUCCESS;
}
This function will be given a Library, a Playlist name and a new Playlist name. Your task is to find the playlistName in the Library of
Playlists and change its name to the name given in newPlaylistName.
You may receive invalid inputs so the function will return either:
ERROR_NOT_FOUND if the given Playlist name is not found otherwise,
ERROR_INVALID_INPUTS if the new Playlist name is invalid (i.e. not alphanumeric).
SUCCESS if a new Playlist is successfully added.
Stage Two
Stage 2 involves navigating around a Library of Playlists and adding Tracks. You will need to implement the following functions:
select_next_playlist
select_previous_playlist
add_track
playlist_length
Select the Next Playlist
In cspotify.c you have been given the function stub (a stub is an unimplemented function):
// Selects the next Playlist in the Library.
void select_next_playlist(Library library) {

}
This function will be given a Library. In Stage 1, by default the first Playlist added into the Library was selected. For this function, you will
need to change the selected Playlist in the Library to the Playlist after the currently selected Playlist.
If the currently selected Playlist is the last Playlist in the Library, make the first Playlist in the Library become the new selected
Playlist.
The function should not return anything.
Select the Previous Playlist
Command: R
Example: R Roadtrip SleepMusic
Description: Renames the existing Playlist "Roadtrip" to "SleepMusic".
Command: S
Example: S
Description: Selects the next Playlist in the Library.
2021/3/30 DPST1091 21T1 - Assignment 2 - CSpotify
https://cgi.cse.unsw.edu.au/~... 6/13
In cspotify.c you have been given the function stub (a stub is an unimplemented function):
// Selects the previous Playlist in the Library.
void select_previous_playlist(Library library) {

}
This function is very similar to selecting the next Playlist. Given a Library, you will need to change the Playlist that is selected to the
Playlist before the currently selected Playlist.
If the currently selected Playlist is the first Playlist in the Library, make the last Playlist in the Library become the new selected
Playlist.
The function should not return anything.
Add a Track
In cspotify.c you have been given the function stub (a stub is an unimplemented function):
// Add a new Track to the selected Playlist.
int add_track(Library library, char title[MAX_LEN], char artist[MAX_LEN],
int trackLengthInSec, int position) {
return SUCCESS;
}
This function will be given a Library, Track title, the artist of the Track, the Track length in seconds as well as a position number.
Your task is to go through the selected Playlist and add a new Track node at the position specified by position. If position is 0, the node
should be inserted at the front of the Playlist. If the position has a value equal to the number of Tracks in the Playlist, the node should
be inserted at the end of the Playlist.
It is possible that the same Track can be added to the same Playlist multiple times. You may receive invalid inputs so the function will
return one of the following:
ERROR_NOT_FOUND if there are no Playlists in the Library, otherwise,
ERROR_INVALID_INPUTS if the given title/artist/position/track length is invalid. (see cspotify.h for more details)
SUCCESS if a new Playlist is successfully added.
You will also need to make changes to your print_library function in Stage 1 so that it will now also print out the Tracks you add to a
Playlist.
Calculate the Length of the Playlist
In cspotify.c you have been given the function stub (a stub is an unimplemented function):
// Calculate the total length of the selected Playlist in minutes and seconds.
void playlist_length(Library library, int playlistMinutes, int playlistSeconds) {
}
For this function, you are given a Library and two uninitialised int variables passed into the function by reference (i.e. the two int pointers
you receive in this function are pointing to the memory location of two int variables).
Command: W
Example: W
Description: Selects the previous Playlist in the Library.
Command: a <artist> <trackLengthInSec> <position><br>Example: a PrettySavage BLACKPINK 350 0<br>Description: Adds a new Track at the 0th position in the selected Playlist. Specifically, this is a Track titled "PrettySavage" by the<br>artist "BLACKPINK" and has a Track length of 350 seconds.<br>Command: T<br>Example: T<br>Description: Calculates the total length of the selected Playlist in minutes and seconds. <br>2021/3/30 DPST1091 21T1 - Assignment 2 - CSpotify<br><a href="https://link.segmentfault.com/?enc=c7eKBGLDD6tEdOxWMMKVFg%3D%3D.11%2B6pi7OQOfUCnWr%2BDzEt3dEhBzVBReL8fY6wBb03Leu8oBnoglJ7kr8Vu2tGOpojl8p7OHqAwwSpgNXFOVwOzhjMxFSR50E5Znv0ZAVg08%3D" rel="nofollow">https://cgi.cse.unsw.edu.au/~...</a> 7/13<br>Your task is to go through and calculate the length of the currently selected Playlist in your Library. The total number of minutes in the<br>Playlist should be stored inside the memory pointed to by the playlistMinutes pointer. The total number of seconds in the Playlist<br>should be stored in the memory pointed to by the playlistSeconds pointer.<br>The function should not return anything.<br>Stage Three<br>Stage 3 involves removing objects from your Library and the Library itself. You will be freeing memory which has been malloced. You will<br>need to implement the following functions:<br>delete_track<br>delete_playlist<br>delete_library<br>Delete a Given Track<br>In cspotify.c you have been given the function stub (a stub is an unimplemented function):<br>// Delete the first instance of the given track in the selected Playlist<br>// of the Library.<br>void delete_track(Library library, char track[MAX_LEN]) {<br>}<br>Calling this function should delete the first instance which matches the given Track name within the selected Playlist.<br>The function should not return anything.<br>Delete the Selected Playlist<br>In cspotify.c you have been given the function stub (a stub is an unimplemented function):<br>// Delete the selected Playlist and select the next Playlist in the Library.<br>void delete_playlist(Library library) {<br>}<br>Calling this function should delete the entire selected Playlist as well as all the Tracks within this Playlist. You should ensure that the next<br>Playlist in the Library is selected once the currently selected Playlist is removed. If there is no next Playlist, select the first Playlist in<br>the Library.<br>The function should not return anything.<br>Delete the Entire Library<br>In cspotify.c you have been given the function stub (a stub is an unimplemented function):<br>Command: d <track><br>Example: d LovesickGirls<br>Description: Deletes the first instance of the Track titled "LovesickGirls" in the selected Playlist of the Library.<br>Command: D<br>Example: D<br>Description: Deletes the selected Playlist and select the next Playlist in the Library.<br>Command: X<br>Example: X<br>Description: Deletes an entire Library and its associated Playlists and Tracks. <br>2021/3/30 DPST1091 21T1 - Assignment 2 - CSpotify<br><a href="https://link.segmentfault.com/?enc=vEN8SCpPNi8p8JwSn1FTmQ%3D%3D.9wYq6BURpY6kSjv7KVwX%2B%2F36o1KCagfIQHO4EpPZuM13ri48vWcJ3568ePz%2FHK%2Fp2Bx7dc9t4Tn5Gi26IVZadIstkZqJBtmU0LO%2FdygYYBM%3D" rel="nofollow">https://cgi.cse.unsw.edu.au/~...</a> 8/13<br>// Delete an entire Library and its associated Playlists and Tracks.<br>void delete_library(Library library) {<br>}<br>Calling this function should delete the entire given Library including its Playlists and Tracks within each Playlist.<br>The function should not return anything.<br>Stage Four<br>Stage 4 consists of more involved manipulations of the Library. You will need to implement the following functions:<br>cut_and_paste_track<br>soundex_search<br>Cut and Paste Track<br>In cspotify.c you have been given the function stub (a stub is an unimplemented function):<br>// Cut the given track in selected Playlist and paste it into the given<br>// destination Playlist.<br>int cut_and_paste_track(Library library, char trackTitle[MAX_LEN],<br> char destPlaylist[MAX_LEN]) {<br> return SUCCESS;<br>}<br>This function will take in a Library, a Track title and a destination Playlist. It should remove the first Track instance which matches the given<br>trackName from the selected Playlist and add it into the end of the Playlist with the given destination Playlist name. The function<br>should return one of the error codes (see cspotify.h for more details) or SUCCESS.<br>Soundex Search<br>What is Soundex?<br>Soundex is a phonetic algorithm which allows strings to be encoded so that words which sound similar will have the same encoding despite<br>small differences in spelling.<br>This becomes very useful in searching for music. For example, when searching for artists, mispelling the artist names will still allow you to<br>search for the artist.<br>In cspotify.c you have been given the function stub (a stub is an unimplemented function):<br>// Search the given Library for tracks where its artist<br>// match the given searchTerm<br>void soundex_search(Library library, char artist[MAX_LEN]) {</p> <p>}<br>This function will take in a Library and a search term. Your task is to go through the given Library and print out all Tracks with artists that<br>have the same Soundex encoding as the given search term. You will again, need to use the given help function print_track instead of calling<br>printf yourself to print out the matching Tracks.<br>This stage has very few tests in the autotest! They do not necessarily cover every edge case. You should test it with other inputs, and<br>compare your solution against the reference solution.<br>Command: c <trackName> <destPlaylist><br>Example: c WakaWaka Fun<br>Description: Moves the Track title "WakaWaka" from the currently selected Playlist to an existing destination Playlist named "Fun".<br>Command: s <searchTerm><br>Example: s Robert<br>Description: Prints out all Tracks with artists that have the same Soundex Encoding as the given search term. <br>2021/3/30 DPST1091 21T1 - Assignment 2 - CSpotify<br><a href="https://link.segmentfault.com/?enc=G6GNEZg9FVj3WiBcqb%2FPiA%3D%3D.0WstajiVjP01BrE5%2BeZelk21KR1YH1PRCzgpqIQAySDabHCbfM35KDZdvYiYkzxioD5y24bnzaXVCZyrJZHOQZk6o8%2F8YbhXkT83HWqQ3RA%3D" rel="nofollow">https://cgi.cse.unsw.edu.au/~...</a> 9/13<br>The specific version of the Soundex algorithm which will be used is specified in cspotify.h<br>The function should not return anything.<br>Stage Five<br>Stage 5 consists of more involved manipulations of the Library. You will need to implement the following functions:<br>add_filtered_playlist<br>reorder_playlist<br>Add Filtered Playlist<br>In cspotify.c you have been given the function stub (a stub is an unimplemented function):<br>// Move all Tracks with artists that have the same Soundex Encoding as<br>// the given artist to a new Playlist.<br>int add_filtered_playlist(Library library, char artist[MAX_LEN]) {<br> return SUCCESS;<br>}<br>This function will take in a Library and an artist. It should go through the entire Library and move all Tracks with artists that have the same<br>Soundex Encoding as the given artist into a new Playlist named with the given artist. The function should return one of the error codes (see<br>cspotify.h for more details) or SUCCESS.<br>Reorder Playlist<br>In cspotify.c you have been given the function stub (a stub is an unimplemented function):<br>// Move all Tracks with artists that have the same Soundex Encoding as<br>// the given artist to a new Playlist.<br>// Reorder the selected Playlist in the given order specified by the order array.<br>void reorder_playlist(Library library, int order[MAX_LEN], int length) {<br>}<br>This function differs slightly in the way in which the command is executed. Once the above command is executed, the program will prompt<br>you to enter a series of integers.<br>This function will take in a Library, an order array and length. It should reorder the Tracks in the selected Playlist based on the order in the<br>given array. More details about this function has been given in cspotify.h.<br>Testing<br>It is important to test your program thoroughly to make sure it can manage different situations.<br>Writing your own Automated Tests<br>As you implement functions in cspotify.c, you will encounter autotests in that require you to implement the functions in test cspotify.c.<br>This stage has very few tests in the autotest! They do not necessarily cover every edge case. You should test it with other inputs, and<br>compare your solution against the reference solution.<br>Command: F <artist><br>Example: F Taylor<br>Description: Move all Tracks with artists that have the same Soundex Encoding as "Taylor" to a new Playlist.<br>Command: r <length><br>Example: r 5<br>Description: Reorders the selected Playlist of 5 Tracks in an order which will be specified in the input following this command. <br>2021/3/30 DPST1091 21T1 - Assignment 2 - CSpotify<br><a href="https://link.segmentfault.com/?enc=znfxs5nd8GiaPkKj8nWZ2A%3D%3D.nnJj04RAf5wZe4xEMijUz6X6V%2B6KAO3KLxq0GN7RWu1lkl8Y9qzyaoXs8Xee6yzMeZv9uz4DSkwW23OGpKDFEwOGPB1YBK2DsVfB1doC4DM%3D" rel="nofollow">https://cgi.cse.unsw.edu.au/~...</a> 10/13<br>s you p e e t u ct o s cspot y.c, you e cou te autotests t at equ e you to p e e t t e u ct o s test_cspot y.c.<br>You are given a file test_main.c. This is not the same as the interactive program in main.c. Instead, it runs the series of automatic tests on the<br>functionality provided by cspotify.h and cspotify.c. You should not change this main function.<br>Your main function will call other functions that look like this:<br>// Test function for 'add_playlist'<br>int test_add_playlist(void) {<br> // Test 1: Does add_playlist return SUCCESS and add<br> // when adding one Playlist with a valid name?<br> Library testLibrary = create_library();<br> int result = add_playlist(testLibrary, "Favourites");<br> if (result != SUCCESS) {<br> printf("DOES NOT MEET SPEC\n");<br> return;<br> }<br> char printText[10000];<br> CAPTURE(print_library(testLibrary), printText, 10000);<br> if (!string_contains(printText, "Favourites")) {<br> printf("DOES NOT MEET SPEC\n");<br> return;<br> }<br> // Test 2: Does add_playlist return ERROR_INVALID_INPUTS<br> // and not add the playlist into the Library<br> // when trying to add a Playlist with an invalid name?<br> // TODO: Add your test for Test 2<br> // Test 3: ???<br> // TODO: Add your own test, and explain it.<br> printf("MEETS SPEC\n");<br>}<br>Your job is to fill in the spaces where it says "TODO" with a series of C statements that check whether the functions in cspotify.c work.<br>As you can see in Test 1, some of these functions have already been partially implemented to show you what you should do<br>Some functions will ask you to specifically test something (in this case, to make sure add_playlist returns the correct amount if you call it<br>many times).<br>Some functions will ask you to decide on your own test. You should describe what you are testing, and then write a test for that situation.<br>Note that you can only test functions by checking their outputs, and their output to the terminal. You cannot access the fields of a struct, nor<br>can you redefine the structs from cspotify.c in test_cspotify.c. Doing so may cause you to lose marks.<br>You can test your tests yourself, by compiling it against your cspotify.c.<br>This is what you will see when you compile the starter code/tests.<br>$ dcc -o test_cspotify test_cspotify.c cspotify.c capture.c<br>$ ./test_cspotify<br><em><del>~</del><del>~</del><del>~</del><del>~</del><del>~{ CSpotify Tests }</del><del>~</del><del>~</del><del>~</del><del>~</del>~</em><br>Stage 1 - Test add_playlist: DOES NOT MEET SPEC<br>Stage 1 - Test rename_playlist: DOES NOT MEET SPEC<br>Stage 2 - Test add_track: MEETS SPEC<br>Stage 2 - Test playlist_length: MEETS SPEC<br>Stage 3 - Test delete_playlist: MEETS SPEC<br>Stage 4 - Test soundex_search: MEETS SPEC<br>Your extra tests: MEETS SPEC<br>Capture<br>You may notice that we have given you two extra files -- capture.c and capture.h. These files define the CAPTURE macro. Macros are not<br>covered in this course and as a result, you do not need to understand these files.<br>You can use them to capture what a function prints and put it into a string. This is useful if you use it with for example, the print_library<br>function, since you can then test the output for the Library is as you expect.<br>The header of capture.h describes how to use it.<br>2021/3/30 DPST1091 21T1 - Assignment 2 - CSpotify<br><a href="https://link.segmentfault.com/?enc=mEl%2B6aW1%2BeD9PFQP5SAKEA%3D%3D.a99kHkN%2BrWIiq9xjfmK5oViJ2H7kJqbsDUq9uABiG3rY0eQp3Uhf2VHwh2l3TEt5zqywpFTN8UwRI34roC5fnuXK5N5UhduUs6OMu95mutY%3D" rel="nofollow">https://cgi.cse.unsw.edu.au/~...</a> 11/13<br>// This file contains the <code>CAPTURE()</code> macro. To use this macro,<br>// you should define a large, empty string. Lets say your string is:<br>// char str[MAX_LENGTH];<br>// Then you can do the following:<br>// CAPTURE(my_function(), str, MAX_LENGTH)<br>// Which will put the output of <code>my_function()</code> into str.<br>Autotests<br>As usual autotest is available with some simple tests - but your own tests in test_cspotify.c may be more useful at pinpointing exactly<br>which functions are and aren't working.<br>$ 1091 autotest cspotify<br>If you wish to use autotest to view only a specific stage of the assignment, you can use autotest-stage. The following example shows how to<br>autotest stage 1 but you can replace the stage number with any stage you would like to test.<br>$ 1091 autotest-stage 01 cspotify<br>Frequently Asked Questions<br>How many tests do I need to complete to get full marks?<br>You only need to complete the tests marked with "TODO"; except the extra_tests which are optional. For each function, this means you will<br>need to write two tests (note that this desn't include tests we have provided you). You do not need to write tests for stage five, though we<br>encourage you to do so for your own learning and enjoyment!<br>Why can't I access structs from cspotify.c inside of test_cspotify.c?<br>The way C works is if the struct definition is not present in the current .c file then the code there is not able to access the members of that<br>struct. You can create a pointer variable which points to that struct, but you will not be able to access it's members with ->. This is a good<br>thing, and is intended.<br>This design feature is because it allows us to implement Abstract Data-Types (ADTs). The objective of using ADTs is so that the code of one<br>file can not access the “inner workings” of a variable that it uses, but is restricted to calling functions from a .h file with that variable. This may<br>sound counter productive at first, why would you want to limit access to a variable? Actually there are several advantages:</p> <ol> <li>Access Control: This is a useful concept when you have multiple programmers working together. It allows you to police the things that<br>happens to your Library. If you are the creator of the data type (the Library) you can prevent other people (who may not know what<br>their doing) from changing pointers (perhaps accidentally) in your data structure and in general ruining things.</li> <li>Abstraction: It presents a simple interface (defined in the .h file) to use the code of your Library. If you are the user of the data type<br>someone else has created, it is really helpful to be presented with a simpler interface which hides the details of the underlying data<br>structures, so they don't have to learn as many things to be able to use your data type.</li> <li>Decoupling: All test_cspotify.c files will conform to a common interface. Perhaps the way the other students in this course organised<br>the members in their structs might be different to the way you're doing it. Tests which don't directly interact with the Library's<br>members are interchangeable in this sense, one student's tests could be paired up with another student's Library and there wouldn't<br>be any compatibility issues there.<br>So, to fix your error, try to design tests which don't stab -> into the Library, just call the functions in cspotify.h and check their outputs are<br>correct/they did the correct things.<br>(Answer adapted from a forum post by Dean Wunder)<br>Can I define structs from cspotify.c in test_cspotify.c?<br>Unfortunately no, See above.<br>Why do I keep getting the Incomplete definition of type ... error?<br>Please Note: There will be tests in the autotest which are dedicated to testing some of the tests you write in test_cspotify.c. These<br>have not been released yet and will be released shortly after the assignment release.<br>2021/3/30 DPST1091 21T1 - Assignment 2 - CSpotify<br><a href="https://link.segmentfault.com/?enc=XcS9YwryHx0avZryTE1%2FTg%3D%3D.Oo8PDxzOakS46mBYxGgqovTC5nctaIeOIZlK53TC9AYerOG5W5NUD1gfpy1DxyUKes8CbgocGRE1dMN0Pc%2FoF4S7yoR7nsp%2FLgkDMcbyR%2Bg%3D" rel="nofollow">https://cgi.cse.unsw.edu.au/~...</a> 12/13<br>See above.<br>Look out for this space! More may be added to clarify any questions throughout the assignment!<br>Assessment<br>Attribution of Work<br>This is an individual assignment. The work you submit must be your own work and only your work apart from exceptions below. Joint work is<br>not permitted.<br>You may use small amounts (< 10 lines) of general purpose code (not specific to the assignment) obtained from site such as Stack Overflow<br>or other publically available resources. You should attribute clearly the source of this code in a comment with it.<br>You are not permitted to request help with the assignment apart from in the course forum, help sessions or from course lecturers or tutors.<br>Do not provide or show your assignment work to any other person (including by posting it on the forum) apart from the teaching staff of<br>DPST1091.<br>The work you submit must otherwise be entirely your own work. Submission of work partially or completely derived from any other person<br>or jointly written with any other person is not permitted. The penalties for such an offence may include negative marks, automatic failure of<br>the course and possibly other academic discipline. Assignment submissions will be examined both automatically and manually for such<br>submissions.<br>Relevant scholarship authorities will be informed if students holding scholarships are involved in an incident of plagiarism or other<br>misconduct. If you knowingly provide or show your assignment work to another person for any reason, and work derived from it is submitted<br>you may be penalized, even if the work was submitted without your knowledge or consent. This may apply even if your work is submitted by<br>a third party unknown to you.<br>Note, you will not be penalised if your work is taken without your consent or knowledge.<br>Submission of Work<br>You are required to test and/or submit intermediate versions of your assignment. Every time you work on the assignment and make<br>some progress you should copy your work to your CSE account and submit it using the give command, or autotest it using 1091 autotest<br>It is fine if intermediate versions do not compile or otherwise fail submission tests.<br>Only the final submitted version of your assignment will be marked. You must give when you have completed your assignment.<br>If you would like to retrieve your old work, you can go to: View Autotests/Submissions/Marking and click the yellow bubble next to<br>ass2_cspotify. This will show you a timeline of all the code you have submitted recently.<br>You submit your work like this:<br>$ give dp1091 ass2_cspotify cspotify.c test_cspotify.c<br>The only files you can modify are cspotify.c and test_cspotify.c. It is not possible to add new files, or modify the other files we have<br>given you. If you believe you need to modify those files, you have misunderstood the specification. You should not modify your copies of<br>those files in any way.<br>Assessment Scheme<br>This assignment will contribute 15% to your final mark.<br>70% of the marks for this assignment will be based on the performance of the functions you write in cspotify.c.<br>10% of the marks for this assignment will come from the test_cspotify.c file. We will examine your own test cases to assess how many<br>distinct cases they test, and whether they meet the descriptions in test_cspotify.h.<br>20% of the marks for assignment 2 will come from hand marking of the readability of the C you have written. These marks will be awarded<br>on the basis of clarity, commenting, elegance and style. In other words, your tutor will assess how easy it is for a human to read and<br>understand your program.<br>Here is an indicative marking scheme.</li> <li>Completely working implementation of Stages 1-5; with beautiful code and a test_cspotify.c with useful tests filling in<br>the TODO comments.<br>2021/3/30 DPST1091 21T1 - Assignment 2 - CSpotify<br><a href="https://link.segmentfault.com/?enc=KnF1rcH6E0dnCuE7hIeazA%3D%3D.DB2OqeN6Va6a6as23SkZpEBaAVy6mCgc8HMCsDczCkKpXGzrDPO9jDmfdLncUo6aMSusjUhQoW6gi02OLLYeDpnlE%2F04KNf7DgipQ6NhTNw%3D" rel="nofollow">https://cgi.cse.unsw.edu.au/~...</a> 13/13<br>DPST1091 21T1: Programming Fundamentals is brought to you by<br>the School of Computer Science and Engineering<br>at the University of New South Wales, Sydney.<br>For all enquiries, please email the class account at <a href="mailto:dp1091@cse.unsw.edu.au">dp1091@cse.unsw.edu.au</a><br>CRICOS Provider 00098G</li> <li>Completely working implementation of Stages 1-4; with very readable code and a test_cspotify.c with useful tests<br>filling in the TODO comments.</li> <li>Completely working implementation of Stages 1-3; with readable code and a test suite covering up to stage 3 in<br>test_cspotify.c.</li> <li>Completely working implementation of Stages 1 and 2; with understandable code and a test suite that covers stage 1-2<br>functions in test_cspotify.c.</li> <li>Completely working implementation of Stage 1; with an attempt at readable code, and some tests added to<br>test_cspotify.c.<br>40-50 Partially working implementation of Stage 1.<br>0% Knowingly providing your work to anyone and it is subsequently submitted (by anyone).<br>0% Submitting any other person's work. This includes joint work.</li> <li>FL for<br>DPST1091<br>Paying another person to complete work. Submitting another person's work without their consent.<br>The lecturer may vary the assessment scheme after inspecting the assignment submissions but it will remain broadly similar to the<br>description above.<br>Due Date<br>This assignment is due Friday 9 April 2021 20:00:00<br>If your assignment is submitted after this date, each hour it is late reduces the maximum mark it can achieve by 2%. For example if an<br>assignment worth 78% was submitted 5 hours late, the late submission would have no effect. If the same assignment was submitted 15<br>hours late it would be awarded 70%, the maximum mark it can achieve at that time.<br>Change Log<br>Credits<br>Created by Tom Kunc and Marc Chee and with contributions from Liz Willer, Dean Wunder, and Tammy Zhong<br>Version 1.0<br>(2020-10-10 10:00:00)<br>Assignment released.</li> </ol> </article> </div> </div> </div> <!--PC和WAP自适应版--> <div id="SOHUCS" sid="1511289750256943104"></div> <script type="text/javascript" src="/views/front/js/chanyan.js"></script> <!-- 文章页-底部 动态广告位 --> <div class="youdao-fixed-ad" id="detail_ad_bottom"></div> </div> <div class="col-md-3"> <div class="row" id="ad"> <!-- 文章页-右侧1 动态广告位 --> <div id="right-1" class="col-lg-12 col-md-12 col-sm-4 col-xs-4 ad"> <div class="youdao-fixed-ad" id="detail_ad_1"> </div> </div> <!-- 文章页-右侧2 动态广告位 --> <div id="right-2" class="col-lg-12 col-md-12 col-sm-4 col-xs-4 ad"> <div class="youdao-fixed-ad" id="detail_ad_2"></div> </div> <!-- 文章页-右侧3 动态广告位 --> <div id="right-3" class="col-lg-12 col-md-12 col-sm-4 col-xs-4 ad"> <div class="youdao-fixed-ad" id="detail_ad_3"></div> </div> </div> </div> </div> </div> </div> <div class="container"> <h4 class="pt20 mb15 mt0 border-top">你可能感兴趣的:(前端)</h4> <div id="paradigm-article-related"> <div class="recommend-post mb30"> <ul class="widget-links"> <li><a href="/article/1950232190038110208.htm" title="day15|前端框架学习和算法" target="_blank">day15|前端框架学习和算法</a> <span class="text-muted">universe_01</span> <a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a><a class="tag" taget="_blank" href="/search/%E7%AE%97%E6%B3%95/1.htm">算法</a><a class="tag" taget="_blank" href="/search/%E7%AC%94%E8%AE%B0/1.htm">笔记</a> <div>T22括号生成先把所有情况都画出来,然后(在满足什么情况下)把不符合条件的删除。T78子集要画树状图,把思路清晰。可以用暴力法、回溯法和DFS做这个题DFS深度搜索:每个边都走完,再回溯应用:二叉树搜索,图搜索回溯算法=DFS+剪枝T200岛屿数量(非常经典BFS宽度把树状转化成队列形式,lambda匿名函数“一次性的小函数,没有名字”setup语法糖:让代码更简洁好写的语法ref创建:基本类型的</div> </li> <li><a href="/article/1950191208873652224.htm" title="vue element 封装表单" target="_blank">vue element 封装表单</a> <span class="text-muted">影子信息</span> <a class="tag" taget="_blank" href="/search/vue/1.htm">vue</a><a class="tag" taget="_blank" href="/search/vue.js/1.htm">vue.js</a><a class="tag" taget="_blank" href="/search/javascript/1.htm">javascript</a><a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a> <div>背景:在前端系统开发中,系统页面涉及到的表单组件比较多,所以进行了简单的封装。封装的包括一些Form表单组件,如下:input输入框、select下拉框、等实现效果:理论知识:表单组件官方链接:点击跳转封装组件:封装组件的思路:不封装element组件,每一个input组件绑定一个form对象,例如官网。简单封装element组件,利用for循环生成form表单的每一项el-form-item。进</div> </li> <li><a href="/article/1950191165710069760.htm" title="前端面试每日 3+1 —— 第39天" target="_blank">前端面试每日 3+1 —— 第39天</a> <span class="text-muted">浪子神剑</span> <div>今天的面试题(2019.05.25)——第39天[html]title与h1、b与strong、i与em的区别分别是什么?[css]写出你知道的CSS水平和垂直居中的方法[js]说说你对模块化的理解[软技能]公钥加密和私钥加密是什么?《论语》,曾子曰:“吾日三省吾身”(我每天多次反省自己)。前端面试每日3+1题,以面试题来驱动学习,每天进步一点!让努力成为一种习惯,让奋斗成为一种享受!欢迎在Iss</div> </li> <li><a href="/article/1950178477592342528.htm" title="前端数据库:IndexedDB从基础到高级使用指南" target="_blank">前端数据库:IndexedDB从基础到高级使用指南</a> <span class="text-muted"></span> <div>文章目录前端数据库:IndexedDB从基础到高级使用指南引言一、IndexedDB概述1.1什么是IndexedDB1.2与其他存储方案的比较二、基础使用2.1打开/创建数据库2.2基本CRUD操作添加数据读取数据更新数据删除数据三、高级特性3.1复杂查询与游标3.2事务高级用法3.3性能优化技巧四、实战案例:构建离线优先的待办事项应用4.1数据库设计4.2同步策略实现五、常见问题与解决方案5.</div> </li> <li><a href="/article/1950169524384886784.htm" title="【Java Web实战】从零到一打造企业级网上购书网站系统 | 完整开发实录(三)" target="_blank">【Java Web实战】从零到一打造企业级网上购书网站系统 | 完整开发实录(三)</a> <span class="text-muted">笙囧同学</span> <a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a><a class="tag" taget="_blank" href="/search/%E7%8A%B6%E6%80%81%E6%A8%A1%E5%BC%8F/1.htm">状态模式</a> <div>核心功能设计用户管理系统用户管理是整个系统的基础,我设计了完整的用户生命周期管理:用户注册流程验证失败验证通过验证失败验证通过用户名已存在用户名可用失败成功用户访问注册页面填写注册信息前端表单验证显示错误提示提交到后端后端数据验证返回错误信息用户名唯一性检查提示用户名重复密码加密处理保存用户信息保存成功?显示系统错误注册成功跳转登录页面登录认证机制深度解析我实现了一套企业级的多层次安全认证机制:认</div> </li> <li><a href="/article/1950169526440095744.htm" title="从零到一:打造基于GigaChat AI的艺术创作平台 | 笙囧同学的全栈开发实战" target="_blank">从零到一:打造基于GigaChat AI的艺术创作平台 | 笙囧同学的全栈开发实战</a> <span class="text-muted"></span> <div>作者简介:笙囧同学,中科院计算机大模型方向硕士,全栈开发爱好者联系方式:3251736703@qq.com各大平台账号:笙囧同学座右铭:偷懒是人生进步的阶梯前言在AI技术飞速发展的今天,如何将前沿的大模型技术与实际应用相结合,一直是我们开发者关注的焦点。今天,笙囧同学将带大家从零开始,构建一个基于GigaChatAI的艺术创作平台,实现React前端+Django后端的完整全栈解决方案。这不仅仅是</div> </li> <li><a href="/article/1950164483057971200.htm" title="14.tornado操作之应用Websocket协议实现聊天室功能" target="_blank">14.tornado操作之应用Websocket协议实现聊天室功能</a> <span class="text-muted">孤寒者</span> <a class="tag" taget="_blank" href="/search/Tornado%E6%A1%86%E6%9E%B6%E4%BB%8E%E5%85%A5%E9%97%A8%E5%88%B0%E5%AE%9E%E6%88%98/1.htm">Tornado框架从入门到实战</a><a class="tag" taget="_blank" href="/search/websocket/1.htm">websocket</a><a class="tag" taget="_blank" href="/search/tornado/1.htm">tornado</a><a class="tag" taget="_blank" href="/search/%E8%81%8A%E5%A4%A9%E5%AE%A4%E5%8A%9F%E8%83%BD%E5%AE%9E%E7%8E%B0/1.htm">聊天室功能实现</a><a class="tag" taget="_blank" href="/search/python/1.htm">python</a> <div>目录:每篇前言:1.什么是WebSocket(1)定义(2)优点(3)和HTTP对比(4)适用场景2.WebSocket关键方法3.本tornado项目中使用WebSocket(1)准备一个聊天室的页面:第一步:编写视图:第二步:编写接口:(app.py中加入以下接口!)第三步:编写前端页面:测试接口——响应OK!(2)使用WebSocket:(3)聊天室的聊天功能的最终实现:第一步:战前准备第二</div> </li> <li><a href="/article/1950144218282389504.htm" title="为什么学习Web前端一定要掌握JavaScript?" target="_blank">为什么学习Web前端一定要掌握JavaScript?</a> <span class="text-muted">web前端学习指南</span> <div>为什么学习Web前端一定要掌握JavaScript?在前端的世界里,没有什么是JavaScript实现不了的,关于JS有一句话:凡是可以用JavaScript来写的应用,最终都会用JavaScript,JavaScript可运行在所有主要平台的所有主流浏览器上,也可运行在每一个主流操作系统的服务器端上。现如今我们在为网站写任何一个主要功能的时候都需要有懂能够用JavaScript写前端的开发人员。</div> </li> <li><a href="/article/1950143305194991616.htm" title="小架构step系列25:错误码" target="_blank">小架构step系列25:错误码</a> <span class="text-muted">秋千码途</span> <a class="tag" taget="_blank" href="/search/%E6%9E%B6%E6%9E%84/1.htm">架构</a><a class="tag" taget="_blank" href="/search/java/1.htm">java</a> <div>1概述一个系统中,可能产生各种各样的错误,对这些错误进行编码。当错误发生时,通过这个错误码就有可能快速判断是什么错误,不一定需要查看代码就可以进行处理,提高问题处理效率。有了统一的错误码,还可以标准化错误信息,方便把错误信息纳入文档管理和对错误信息进行国际化等。没有错误码的管理,开发人员就会按自己的理解处理这些错误。有些直接把堆栈直接反馈到前端页面上,使用看不懂这些信息体验很差,也暴露了堆栈信息有</div> </li> <li><a href="/article/1950140903616212992.htm" title="Java朴实无华按天计划从入门到实战(强化速战版-66天)" target="_blank">Java朴实无华按天计划从入门到实战(强化速战版-66天)</a> <span class="text-muted">岫珩</span> <a class="tag" taget="_blank" href="/search/Java/1.htm">Java</a><a class="tag" taget="_blank" href="/search/%E5%90%8E%E7%AB%AF/1.htm">后端</a><a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/1.htm">开发语言</a><a class="tag" taget="_blank" href="/search/%E5%AD%A6%E4%B9%A0/1.htm">学习</a><a class="tag" taget="_blank" href="/search/Java/1.htm">Java</a><a class="tag" taget="_blank" href="/search/%E6%97%B6%E9%97%B4%E5%AE%89%E6%8E%92/1.htm">时间安排</a><a class="tag" taget="_blank" href="/search/%E5%AD%A6%E4%B9%A0%E8%AE%A1%E5%88%92/1.htm">学习计划</a> <div>致敬读者感谢阅读笑口常开生日快乐⬛早点睡觉博主相关博主信息博客首页专栏推荐活动信息文章目录Java朴实无华按天计划从入门到实战(强化速战版-66天)1.基础(18)1.1JavaSE核心(5天)1.2数据库与SQL(5天)1.3前端基础(8天)2.进阶(17天)2.1JavaWeb核心(5天)2.2Mybatis与Spring全家桶(6天)2.3中间件入门(4天)2.4实践项目(2天)3.高阶(1</div> </li> <li><a href="/article/1950132204336115712.htm" title="《跨域资源共享CORS的深层逻辑与前端实践精要》" target="_blank">《跨域资源共享CORS的深层逻辑与前端实践精要》</a> <span class="text-muted"></span> <div>不同源头的资源交互已成为常态,而跨域资源共享(CORS)正是支撑这种交互的隐形架构。现代Web安全体系中平衡开放与防护的精妙设计。理解CORS的深层逻辑,不仅能解决实际开发中的跨域难题,更能触及网络安全与资源流通的核心矛盾,为前端工程师构建稳健的应用提供底层认知支撑。跨域资源共享的诞生,源于网络安全与应用发展的必然冲突。浏览器的同源策略,作为早期网络安全的基石,通过限制不同源文档的交互,有效阻挡了</div> </li> <li><a href="/article/1950131321980383232.htm" title="深入了解 Kubernetes(k8s):从概念到实践" target="_blank">深入了解 Kubernetes(k8s):从概念到实践</a> <span class="text-muted"></span> <div>目录一、k8s核心概念二、k8s的优势三、k8s架构组件控制平面组件节点组件四、k8s+docker运行前后端分离项目的例子1.准备前端项目2.准备后端项目3.创建k8s部署配置文件4.部署应用到k8s集群在当今云计算和容器化技术飞速发展的时代,Kubernetes(简称k8s)已成为容器编排领域的事实标准。无论是互联网巨头、传统企业还是初创公司,都在广泛采用k8s来管理和部署容器化应用。本文将带</div> </li> <li><a href="/article/1950119224630374400.htm" title="大厂都在用的前端缓存策略,你掌握了吗?" target="_blank">大厂都在用的前端缓存策略,你掌握了吗?</a> <span class="text-muted">AI架构全栈开发实战笔记</span> <a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a><a class="tag" taget="_blank" href="/search/%E7%BC%93%E5%AD%98/1.htm">缓存</a><a class="tag" taget="_blank" href="/search/ai/1.htm">ai</a> <div>大厂都在用的前端缓存策略,你掌握了吗?关键词:前端缓存、HTTP缓存、ServiceWorker、CDN缓存、缓存策略、性能优化、浏览器缓存摘要:本文将深入探讨前端开发中常用的缓存策略,从浏览器缓存到ServiceWorker,从HTTP缓存头到CDN缓存,全面解析大厂都在使用的高效缓存技术。通过生动的比喻和实际代码示例,帮助开发者理解并掌握这些提升Web应用性能的关键技术。背景介绍目的和范围本文</div> </li> <li><a href="/article/1950115062781898752.htm" title="26. 什么是雪碧图,作用和原理了解吗" target="_blank">26. 什么是雪碧图,作用和原理了解吗</a> <span class="text-muted">yqcoder</span> <a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF%E9%9D%A2%E8%AF%95-CSS/1.htm">前端面试-CSS</a><a class="tag" taget="_blank" href="/search/css/1.htm">css</a><a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a><a class="tag" taget="_blank" href="/search/html/1.htm">html</a> <div>总结小图合成一张,使用background来使用,减少资源请求一、什么是雪碧图?雪碧图(CSSSprite)是一种前端优化技术,指的是将多个小图标合并成一张大图,通过CSS控制显示其中的某一部分。它常用于网站中图标、按钮等小图较多的场景。二、雪碧图的作用作用说明✅减少HTTP请求次数合并多个图片为一张图,减少请求资源数✅提升页面加载速度尤其在图片较多时效果明显✅避免图片加载闪烁鼠标悬停切换图片时不</div> </li> <li><a href="/article/1950112039502409728.htm" title="H5UI微信小程序前端框架实战指南" target="_blank">H5UI微信小程序前端框架实战指南</a> <span class="text-muted">ai</span> <div>本文还有配套的精品资源,点击获取简介:H5UI是一个为微信小程序开发设计的前端框架,基于H5技术,提供简洁高效的组件库。框架集成了丰富的UI元素,如按钮、表格、导航栏等,简化了界面布局和交互的实现。通过安装、引入、使用组件和事件绑定四个步骤,开发者可以轻松构建功能齐全的应用。了解性能优化等注意事项对于高效开发同样重要。1.微信小程序前端开发框架介绍微信小程序概述微信小程序是微信官方推出的一种无需下</div> </li> <li><a href="/article/1950104854819041280.htm" title="Ubuntu安装LAMP" target="_blank">Ubuntu安装LAMP</a> <span class="text-muted">L_h1</span> <a class="tag" taget="_blank" href="/search/%E6%B5%8B%E8%AF%95/1.htm">测试</a><a class="tag" taget="_blank" href="/search/ubuntu/1.htm">ubuntu</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a> <div>在安装vim时遇到了一个问题:E:无法获得锁/var/lib/dpkg/lock-frontend-open(11:资源暂时不可用)E:无法获取dpkg前端锁(/var/lib/dpkg/lock-frontend),是否有其他进程正占用它?解决办法:强制解锁sudorm/var/lib/dpkg/lock-frontendsudorm/var/cache/apt/archives/locksud</div> </li> <li><a href="/article/1950104727928762368.htm" title="震惊!DOM变化监控神器MutationObserver,前端开发必知的隐藏武器!" target="_blank">震惊!DOM变化监控神器MutationObserver,前端开发必知的隐藏武器!</a> <span class="text-muted">coding随想</span> <a class="tag" taget="_blank" href="/search/JavaScript/1.htm">JavaScript</a><a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a><a class="tag" taget="_blank" href="/search/javascript/1.htm">javascript</a><a class="tag" taget="_blank" href="/search/html5/1.htm">html5</a> <div>一、什么是MutationObserver?如果你是一个前端开发者,一定会遇到这样的场景:页面动态加载内容后,某些操作失效了。比如,你写了一个监听按钮点击的代码,但按钮是通过AJAX动态加载的,你的代码根本无法触发。这个时候,你就需要一个“监控哨兵”——MutationObserver,它能实时监听DOM树的变化,帮你捕获那些“暗中作祟”的节点变动。MutationObserver是HTML5引入</div> </li> <li><a href="/article/1950094764498022400.htm" title="Coze Studio 架构拆解:AI Agent 开发平台项目结构全分析" target="_blank">Coze Studio 架构拆解:AI Agent 开发平台项目结构全分析</a> <span class="text-muted">代码简单说</span> <a class="tag" taget="_blank" href="/search/2025%E5%BC%80%E5%8F%91%E5%BF%85%E5%A4%87%28%E9%99%90%E6%97%B6%E7%89%B9%E6%83%A0%29/1.htm">2025开发必备(限时特惠)</a><a class="tag" taget="_blank" href="/search/%E6%9E%B6%E6%9E%84/1.htm">架构</a><a class="tag" taget="_blank" href="/search/%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD/1.htm">人工智能</a><a class="tag" taget="_blank" href="/search/Coze/1.htm">Coze</a><a class="tag" taget="_blank" href="/search/Studio/1.htm">Studio</a><a class="tag" taget="_blank" href="/search/%E6%9E%B6%E6%9E%84/1.htm">架构</a><a class="tag" taget="_blank" href="/search/AI/1.htm">AI</a><a class="tag" taget="_blank" href="/search/Agent/1.htm">Agent</a><a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E5%B9%B3%E5%8F%B0/1.htm">开发平台</a><a class="tag" taget="_blank" href="/search/%E5%85%A8%E6%A0%88/1.htm">全栈</a><a class="tag" taget="_blank" href="/search/AI/1.htm">AI</a><a class="tag" taget="_blank" href="/search/%E5%B7%A5%E7%A8%8B%E5%8C%96/1.htm">工程化</a><a class="tag" taget="_blank" href="/search/%E5%9B%BE%E8%A7%A3%E6%9E%B6%E6%9E%84/1.htm">图解架构</a> <div>CozeStudio架构拆解:AIAgent开发平台项目结构全分析标签:CozeStudio项目架构、领域驱动设计DDD、全栈开发规范、Hertz框架、前后端协作、云原生容器、前端测试、IDL接口设计、微服务解耦、AI开发平台源码分析在最近研究AIAgent开发平台的过程中,我深入分析了刚刚开源的CozeStudio项目。这套系统是国内少有的开源全栈AI工程化项目,代码整洁、架构先进,特别是它基于</div> </li> <li><a href="/article/1950075480849838080.htm" title="关于前端的性能优化" target="_blank">关于前端的性能优化</a> <span class="text-muted"></span> <div>性能优化主要涵盖了以下四个方面:(tip:仅代表个人总结,如有不当,还希望看到的大佬多多指示)减少网络请求:合并文件、使用CDN、启用缓存。优化资源加载:代码分割、懒加载、图片压缩。提升渲染性能:减少重绘回流、防抖节流、使用WebWorker。监控和迭代:定期使用工具检测性能,持续优化。一、网络层面优化减少HTTP请求合并文件:将多个CSS或JavaScript文件合并成一个,减少请求次数。使用C</div> </li> <li><a href="/article/1950059723604684800.htm" title="linux网卡显示未知未托管,linux有线网络显示设备未托管" target="_blank">linux网卡显示未知未托管,linux有线网络显示设备未托管</a> <span class="text-muted"></span> <div>NetworkManagerNetworkManager是为了使网络配置尽可能简单而开发的网络管理软件包,如果使用DHCP,NetworkManager会替换默认的路由表、从DHCP服务器获取IP地址并根据情况设置域名服务器,NetworkManager的目标是使网络能够开箱即用。NetworkManager由两部分组成:一个以超级用户运行的守护进程(network-manager);一个前端管理</div> </li> <li><a href="/article/1950053798433058816.htm" title="页面开发样式和布局入门:Vite + Vue 3 + Less" target="_blank">页面开发样式和布局入门:Vite + Vue 3 + Less</a> <span class="text-muted"></span> <div>页面开发样式和布局入门:Vite+Vue3+Less引言在现代前端开发中,样式和布局是页面开发的核心部分。随着技术的不断发展,Vite、Vue3和Less等工具和框架的出现,使得前端开发变得更加高效和灵活。然而,尽管这些工具和框架提供了强大的功能,但在实际开发中仍然会遇到各种样式和布局的问题。本文将结合Vite、Vue3和Less,详细介绍在页面开发中常见的样式和布局问题,并提供解决方案和最佳实践</div> </li> <li><a href="/article/1950046229840850944.htm" title="推客系统小程序机构版开发上线全攻略(2025年最新版)" target="_blank">推客系统小程序机构版开发上线全攻略(2025年最新版)</a> <span class="text-muted">vx_qutudy</span> <a class="tag" taget="_blank" href="/search/%E6%8E%A8%E5%AE%A2%E5%B0%8F%E7%A8%8B%E5%BA%8F/1.htm">推客小程序</a><a class="tag" taget="_blank" href="/search/%E6%8E%A8%E5%AE%A2%E7%B3%BB%E7%BB%9F%E5%BC%80%E5%8F%91/1.htm">推客系统开发</a><a class="tag" taget="_blank" href="/search/%E6%8E%A8%E5%AE%A2%E7%B3%BB%E7%BB%9F%E6%BA%90%E7%A0%81/1.htm">推客系统源码</a> <div>一、开发前准备:筑牢基础,合规先行1.1注册与认证账号注册:登录微信公众平台注册小程序账号,选择“机构版”类型,获取唯一AppID。资质认证:基础资质:企业营业执照、法人身份证、对公账户信息。特殊资质:涉及支付功能:需办理《增值电信业务经营许可证》(ICP证)。涉及教育/医疗内容:需《互联网信息服务许可证》或相关行业资质。1.2技术选型:高效与扩展并重模块推荐方案前端框架微信原生框架(WXML+W</div> </li> <li><a href="/article/1950042324155297792.htm" title="网络安全第14集" target="_blank">网络安全第14集</a> <span class="text-muted">不灭锦鲤</span> <a class="tag" taget="_blank" href="/search/web%E5%AE%89%E5%85%A8/1.htm">web安全</a><a class="tag" taget="_blank" href="/search/%E5%AE%89%E5%85%A8/1.htm">安全</a> <div>前言:小迪安全14集,这集重点内容:0、什么是js渗透测试?在javascript中也存在变量和函数,存在可控变量和函数就有可能存在在漏洞,js开发的web应用和php、java开发的区别是,js能看得到的源代码,php看不到,但是风险就是未授权访问、配置信息泄露(加密算法、key秘钥等),源代码看得到,存在更多的url泄露,从而可能会出现未授权访问,从url,前提:web应用可以采用前端语言或后</div> </li> <li><a href="/article/1950037152830124032.htm" title="怎么判断一个DAPP是否真正去中心化" target="_blank">怎么判断一个DAPP是否真正去中心化</a> <span class="text-muted"></span> <div>判断一个DAPP(去中心化应用)是否真正去中心化,需要从多个维度进行考察。以下是关键评估标准:1.区块链依赖程度✅真正去中心化:核心逻辑和数据处理完全依赖智能合约,运行在区块链上(如以太坊、Solana等)。❌伪去中心化:依赖中心化服务器处理关键数据或业务逻辑,仅前端去中心化。2.智能合约控制权✅去中心化:合约代码开源,无管理员密钥(adminkey)或可升级后门,治理由DAO(去中心化自治组织)</div> </li> <li><a href="/article/1950020001654173696.htm" title="Web前端交互利用Python跟大模型操作" target="_blank">Web前端交互利用Python跟大模型操作</a> <span class="text-muted">哥本哈士奇</span> <a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a><a class="tag" taget="_blank" href="/search/%E4%BA%A4%E4%BA%92/1.htm">交互</a><a class="tag" taget="_blank" href="/search/python/1.htm">python</a> <div>Web前端交互利用Python跟大模型操作一个简单的演示,如何把大模型应用集成到自己的应用场景当中。这里的场景我们模拟的是在吃鸡游戏中,一个作战计划,是否符合老六的行为规范。吃鸡游戏已经风靡很多年,游戏里每个人的游戏风格都不一样,有喜欢钢枪的,有喜欢随机应变的,也有喜欢当老六苟分的。每种风格的游戏方式以及游戏里的行为都不同,所以这里将演示如何应用大模型,去判断一个人的游戏方式,是否符合一个老六的行</div> </li> <li><a href="/article/1950009162180128768.htm" title="尚硅谷微服务尚医通前端npm报错" target="_blank">尚硅谷微服务尚医通前端npm报错</a> <span class="text-muted"></span> <div>尚硅谷微服务尚医通前端npm报错血泪史我的版本的8.0.0,弹幕里说降级npm到6.多就能安装,经过许久挣扎还是各种报错,最后通过一下办法解决解决办法:不需要降低npm版本,办法如下这里需要使用到cnpm:1.导入下载好到的项目2.安装cnpm:npminstallcnpm-g3.安装node-sass:cnpminstallnode-sass4.继续安装:cnpminode-sass-D5.删除</div> </li> <li><a href="/article/1950005000038051840.htm" title="Layui核心语法快速入门指南" target="_blank">Layui核心语法快速入门指南</a> <span class="text-muted">bemyrunningdog</span> <a class="tag" taget="_blank" href="/search/layui/1.htm">layui</a><a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a><a class="tag" taget="_blank" href="/search/javascript/1.htm">javascript</a><a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/1.htm">开发语言</a> <div>Layui基本语法学习指南Layui是一个经典的模块化前端框架,以其轻量易用、组件丰富著称。以下是Layui的核心语法结构和使用方法:一、模块加载机制(核心基础)//标准模块加载语法layui.use(['module1','module2'],function(){//回调函数中获取模块varmod1=layui.module1;varmod2=layui.module2;//模块功能调用mod</div> </li> <li><a href="/article/1950002983613820928.htm" title="前端基础知识Vue3系列 - 04(Vue3.0 所采用的 Composition Api 与 Vue2.x 使用的 Options Api 有什么不同)" target="_blank">前端基础知识Vue3系列 - 04(Vue3.0 所采用的 Composition Api 与 Vue2.x 使用的 Options Api 有什么不同)</a> <span class="text-muted"></span> <div>开始之前CompositionAPI可以说是Vue3的最大特点,那么为什么要推出CompositionApi,解决了什么问题?通常使用Vue2开发的项目,普遍会存在以下问题:代码的可读性随着组件变大而变差每一种代码复用的方式,都存在缺点TypeScript支持有限以上通过使用CompositionApi都能迎刃而解正文一、OptionsApiOptionsAPI,即大家常说的选项API,即以vue</div> </li> <li><a href="/article/1949984445817745408.htm" title="Vue 工程化开发入门" target="_blank">Vue 工程化开发入门</a> <span class="text-muted">dawn191228</span> <a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF%E5%AD%A6%E4%B9%A0/1.htm">前端学习</a><a class="tag" taget="_blank" href="/search/vue.js/1.htm">vue.js</a><a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a><a class="tag" taget="_blank" href="/search/javascript/1.htm">javascript</a><a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF%E6%A1%86%E6%9E%B6/1.htm">前端框架</a> <div>文章目录一、Vue工程化开发概述二、Vue脚手架三、项目运行流程四、组件化开发五、组件注册六、总结在当今的前端开发领域,Vue.js以其简洁、高效的特性受到了广泛的欢迎。Vue的工程化开发能够帮助我们更好地组织和管理项目,提高开发效率和代码质量。本文将带你了解Vue工程化开发入门知识,包括脚手架、项目运行流程、组件化以及组件注册。一、Vue工程化开发概述工程化开发是一种将软件开发过程规范化、标准化</div> </li> <li><a href="/article/1949963001104756736.htm" title="Python,C++,go语言开发社会犯罪人群回归社会跟踪与辅助管理APP" target="_blank">Python,C++,go语言开发社会犯罪人群回归社会跟踪与辅助管理APP</a> <span class="text-muted">Geeker-2025</span> <a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/c%2B%2B/1.htm">c++</a><a class="tag" taget="_blank" href="/search/golang/1.htm">golang</a> <div>开发一款用于**社会犯罪人群回归社会跟踪与辅助管理**的App,结合Python、C++和Go语言的优势,可以实现高效的数据处理、实时的跟踪监控以及用户友好的前端界面。以下是一个详细的开发方案,涵盖技术选型、功能模块、开发步骤等内容。##技术选型###后端(Python+Go)-**编程语言**:-**Python**:用于数据处理、机器学习(如风险评估、行为预测)、脚本编写等。-**Go**:用</div> </li> <li><a href="/article/92.htm" title="log4j对象改变日志级别" target="_blank">log4j对象改变日志级别</a> <span class="text-muted">3213213333332132</span> <a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/log4j/1.htm">log4j</a><a class="tag" taget="_blank" href="/search/level/1.htm">level</a><a class="tag" taget="_blank" href="/search/log4j%E5%AF%B9%E8%B1%A1%E5%90%8D%E7%A7%B0/1.htm">log4j对象名称</a><a class="tag" taget="_blank" href="/search/%E6%97%A5%E5%BF%97%E7%BA%A7%E5%88%AB/1.htm">日志级别</a> <div>log4j对象改变日志级别可批量的改变所有级别,或是根据条件改变日志级别。 log4j配置文件: log4j.rootLogger=ERROR,FILE,CONSOLE,EXECPTION #log4j.appender.FILE=org.apache.log4j.RollingFileAppender log4j.appender.FILE=org.apache.l</div> </li> <li><a href="/article/219.htm" title="elk+redis 搭建nginx日志分析平台" target="_blank">elk+redis 搭建nginx日志分析平台</a> <span class="text-muted">ronin47</span> <a class="tag" taget="_blank" href="/search/elasticsearch/1.htm">elasticsearch</a><a class="tag" taget="_blank" href="/search/kibana/1.htm">kibana</a><a class="tag" taget="_blank" href="/search/logstash/1.htm">logstash</a> <div>             elk+redis 搭建nginx日志分析平台 logstash,elasticsearch,kibana 怎么进行nginx的日志分析呢?首先,架构方面,nginx是有日志文件的,它的每个请求的状态等都有日志文件进行记录。其次,需要有个队 列,redis的l</div> </li> <li><a href="/article/346.htm" title="Yii2设置时区" target="_blank">Yii2设置时区</a> <span class="text-muted">dcj3sjt126com</span> <a class="tag" taget="_blank" href="/search/PHP/1.htm">PHP</a><a class="tag" taget="_blank" href="/search/timezone/1.htm">timezone</a><a class="tag" taget="_blank" href="/search/yii2/1.htm">yii2</a> <div>时区这东西,在开发的时候,你说重要吧,也还好,毕竟没它也能正常运行,你说不重要吧,那就纠结了。特别是linux系统,都TMD差上几小时,你能不痛苦吗?win还好一点。有一些常规方法,是大家目前都在采用的1、php.ini中的设置,这个就不谈了,2、程序中公用文件里设置,date_default_timezone_set一下时区3、或者。。。自己写时间处理函数,在遇到时间的时候,用这个函数处理(比较</div> </li> <li><a href="/article/473.htm" title="js实现前台动态添加文本框,后台获取文本框内容" target="_blank">js实现前台动态添加文本框,后台获取文本框内容</a> <span class="text-muted">171815164</span> <a class="tag" taget="_blank" href="/search/%E6%96%87%E6%9C%AC%E6%A1%86/1.htm">文本框</a> <div> <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://w</div> </li> <li><a href="/article/600.htm" title="持续集成工具" target="_blank">持续集成工具</a> <span class="text-muted">g21121</span> <a class="tag" taget="_blank" href="/search/%E6%8C%81%E7%BB%AD%E9%9B%86%E6%88%90/1.htm">持续集成</a> <div>        持续集成是什么?我们为什么需要持续集成?持续集成带来的好处是什么?什么样的项目需要持续集成?...        持续集成(Continuous integration ,简称CI),所谓集成可以理解为将互相依赖的工程或模块合并成一个能单独运行</div> </li> <li><a href="/article/727.htm" title="数据结构哈希表(hash)总结" target="_blank">数据结构哈希表(hash)总结</a> <span class="text-muted">永夜-极光</span> <a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/1.htm">数据结构</a> <div>1.什么是hash 来源于百度百科: Hash,一般翻译做“散列”,也有直接音译为“哈希”的,就是把任意长度的输入,通过散列算法,变换成固定长度的输出,该输出就是散列值。这种转换是一种压缩映射,也就是,散列值的空间通常远小于输入的空间,不同的输入可能会散列成相同的输出,所以不可能从散列值来唯一的确定输入值。简单的说就是一种将任意长度的消息压缩到某一固定长度的消息摘要的函数。   </div> </li> <li><a href="/article/854.htm" title="乱七八糟" target="_blank">乱七八糟</a> <span class="text-muted">程序员是怎么炼成的</span> <div>eclipse中的jvm字节码查看插件地址: http://andrei.gmxhome.de/eclipse/ 安装该地址的outline 插件  后重启,打开window下的view下的bytecode视图 http://andrei.gmxhome.de/eclipse/   jvm博客: http://yunshen0909.iteye.com/blog/2</div> </li> <li><a href="/article/981.htm" title="职场人伤害了“上司” 怎样弥补" target="_blank">职场人伤害了“上司” 怎样弥补</a> <span class="text-muted">aijuans</span> <a class="tag" taget="_blank" href="/search/%E8%81%8C%E5%9C%BA/1.htm">职场</a> <div> 由于工作中的失误,或者平时不注意自己的言行“伤害”、“得罪”了自己的上司,怎么办呢?   在职业生涯中这种问题尽量不要发生。下面提供了一些解决问题的建议:   一、利用一些轻松的场合表示对他的尊重   即使是开明的上司也很注重自己的权威,都希望得到下属的尊重,所以当你与上司冲突后,最好让不愉快成为过去,你不妨在一些轻松的场合,比如会餐、联谊活动等,向上司问个好,敬下酒,表示你对对方的尊重,</div> </li> <li><a href="/article/1108.htm" title="深入浅出url编码" target="_blank">深入浅出url编码</a> <span class="text-muted">antonyup_2006</span> <a class="tag" taget="_blank" href="/search/%E5%BA%94%E7%94%A8%E6%9C%8D%E5%8A%A1%E5%99%A8/1.htm">应用服务器</a><a class="tag" taget="_blank" href="/search/%E6%B5%8F%E8%A7%88%E5%99%A8/1.htm">浏览器</a><a class="tag" taget="_blank" href="/search/servlet/1.htm">servlet</a><a class="tag" taget="_blank" href="/search/weblogic/1.htm">weblogic</a><a class="tag" taget="_blank" href="/search/IE/1.htm">IE</a> <div>出处:http://blog.csdn.net/yzhz  杨争   http://blog.csdn.net/yzhz/archive/2007/07/03/1676796.aspx 一、问题:         编码问题是JAVA初学者在web开发过程中经常会遇到问题,网上也有大量相关的</div> </li> <li><a href="/article/1235.htm" title="建表后创建表的约束关系和增加表的字段" target="_blank">建表后创建表的约束关系和增加表的字段</a> <span class="text-muted">百合不是茶</span> <a class="tag" taget="_blank" href="/search/%E6%A0%87%E7%9A%84%E7%BA%A6%E6%9D%9F%E5%85%B3%E7%B3%BB/1.htm">标的约束关系</a><a class="tag" taget="_blank" href="/search/%E5%A2%9E%E5%8A%A0%E8%A1%A8%E7%9A%84%E5%AD%97%E6%AE%B5/1.htm">增加表的字段</a> <div>  下面所有的操作都是在表建立后操作的,主要目的就是熟悉sql的约束,约束语句的万能公式   1,增加字段(student表中增加 姓名字段)   alter table 增加字段的表名 add 增加的字段名 增加字段的数据类型 alter table student add name varchar2(10);   &nb</div> </li> <li><a href="/article/1362.htm" title="Uploadify 3.2 参数属性、事件、方法函数详解" target="_blank">Uploadify 3.2 参数属性、事件、方法函数详解</a> <span class="text-muted">bijian1013</span> <a class="tag" taget="_blank" href="/search/JavaScript/1.htm">JavaScript</a><a class="tag" taget="_blank" href="/search/uploadify/1.htm">uploadify</a> <div>一.属性 属性名称 默认值 说明 auto true 设置为true当选择文件后就直接上传了,为false需要点击上传按钮才上传。 buttonClass ” 按钮样式 buttonCursor ‘hand’ 鼠标指针悬停在按钮上的样子 buttonImage null 浏览按钮的图片的路</div> </li> <li><a href="/article/1489.htm" title="精通Oracle10编程SQL(16)使用LOB对象" target="_blank">精通Oracle10编程SQL(16)使用LOB对象</a> <span class="text-muted">bijian1013</span> <a class="tag" taget="_blank" href="/search/oracle/1.htm">oracle</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E5%BA%93/1.htm">数据库</a><a class="tag" taget="_blank" href="/search/plsql/1.htm">plsql</a> <div>/* *使用LOB对象 */ --LOB(Large Object)是专门用于处理大对象的一种数据类型,其所存放的数据长度可以达到4G字节 --CLOB/NCLOB用于存储大批量字符数据,BLOB用于存储大批量二进制数据,而BFILE则存储着指向OS文件的指针 /* *综合实例 */ --建立表空间 --#指定区尺寸为128k,如不指定,区尺寸默认为64k CR</div> </li> <li><a href="/article/1616.htm" title="【Resin一】Resin服务器部署web应用" target="_blank">【Resin一】Resin服务器部署web应用</a> <span class="text-muted">bit1129</span> <a class="tag" taget="_blank" href="/search/resin/1.htm">resin</a> <div>工作中,在Resin服务器上部署web应用,通常有如下三种方式:   配置多个web-app 配置多个http id 为每个应用配置一个propeties、xml以及sh脚本文件 配置多个web-app   在resin.xml中,可以为一个host配置多个web-app   <cluster id="app&q</div> </li> <li><a href="/article/1743.htm" title="red5简介及基础知识" target="_blank">red5简介及基础知识</a> <span class="text-muted">白糖_</span> <a class="tag" taget="_blank" href="/search/%E5%9F%BA%E7%A1%80/1.htm">基础</a> <div>  简介   Red5的主要功能和Macromedia公司的FMS类似,提供基于Flash的流媒体服务的一款基于Java的开源流媒体服务器。它由Java语言编写,使用RTMP作为流媒体传输协议,这与FMS完全兼容。它具有流化FLV、MP3文件,实时录制客户端流为FLV文件,共享对象,实时视频播放、Remoting等功能。用Red5替换FMS后,客户端不用更改可正</div> </li> <li><a href="/article/1870.htm" title="angular.fromJson" target="_blank">angular.fromJson</a> <span class="text-muted">boyitech</span> <a class="tag" taget="_blank" href="/search/AngularJS/1.htm">AngularJS</a><a class="tag" taget="_blank" href="/search/AngularJS+%E5%AE%98%E6%96%B9API/1.htm">AngularJS 官方API</a><a class="tag" taget="_blank" href="/search/AngularJS+API/1.htm">AngularJS API</a> <div>angular.fromJson 描述: 把Json字符串转为对象 使用方法: angular.fromJson(json); 参数详解: Param Type Details json string JSON 字符串 返回值: 对象, 数组, 字符串 或者是一个数字 示例: <!DOCTYPE HTML> <h</div> </li> <li><a href="/article/1997.htm" title="java-颠倒一个句子中的词的顺序。比如: I am a student颠倒后变成:student a am I" target="_blank">java-颠倒一个句子中的词的顺序。比如: I am a student颠倒后变成:student a am I</a> <span class="text-muted">bylijinnan</span> <a class="tag" taget="_blank" href="/search/java/1.htm">java</a> <div> public class ReverseWords { /** * 题目:颠倒一个句子中的词的顺序。比如: I am a student颠倒后变成:student a am I.词以空格分隔。 * 要求: * 1.实现速度最快,移动最少 * 2.不能使用String的方法如split,indexOf等等。 * 解答:两次翻转。 */ publ</div> </li> <li><a href="/article/2124.htm" title="web实时通讯" target="_blank">web实时通讯</a> <span class="text-muted">Chen.H</span> <a class="tag" taget="_blank" href="/search/Web/1.htm">Web</a><a class="tag" taget="_blank" href="/search/%E6%B5%8F%E8%A7%88%E5%99%A8/1.htm">浏览器</a><a class="tag" taget="_blank" href="/search/socket/1.htm">socket</a><a class="tag" taget="_blank" href="/search/%E8%84%9A%E6%9C%AC/1.htm">脚本</a> <div>关于web实时通讯,做一些监控软件。 由web服务器组件从消息服务器订阅实时数据,并建立消息服务器到所述web服务器之间的连接,web浏览器利用从所述web服务器下载到web页面的客户端代理与web服务器组件之间的socket连接,建立web浏览器与web服务器之间的持久连接;利用所述客户端代理与web浏览器页面之间的信息交互实现页面本地更新,建立一条从消息服务器到web浏览器页面之间的消息通路</div> </li> <li><a href="/article/2251.htm" title="[基因与生物]远古生物的基因可以嫁接到现代生物基因组中吗?" target="_blank">[基因与生物]远古生物的基因可以嫁接到现代生物基因组中吗?</a> <span class="text-muted">comsci</span> <a class="tag" taget="_blank" href="/search/%E7%94%9F%E7%89%A9/1.htm">生物</a> <div>       大家仅仅把我说的事情当作一个IT行业的笑话来听吧..没有其它更多的意思     如果我们把大自然看成是一位伟大的程序员,专门为地球上的生态系统编制基因代码,并创造出各种不同的生物来,那么6500万年前的程序员开发的代码,是否兼容现代派的程序员的代码和架构呢?   </div> </li> <li><a href="/article/2378.htm" title="oracle 外部表" target="_blank">oracle 外部表</a> <span class="text-muted">daizj</span> <a class="tag" taget="_blank" href="/search/oracle/1.htm">oracle</a><a class="tag" taget="_blank" href="/search/%E5%A4%96%E9%83%A8%E8%A1%A8/1.htm">外部表</a><a class="tag" taget="_blank" href="/search/external+tables/1.htm">external tables</a> <div>    oracle外部表是只允许只读访问,不能进行DML操作,不能创建索引,可以对外部表进行的查询,连接,排序,创建视图和创建同义词操作。 you can select, join, or sort external table data. You can also create views and synonyms for external tables. Ho</div> </li> <li><a href="/article/2505.htm" title="aop相关的概念及配置" target="_blank">aop相关的概念及配置</a> <span class="text-muted">daysinsun</span> <a class="tag" taget="_blank" href="/search/AOP/1.htm">AOP</a> <div>切面(Aspect): 通常在目标方法执行前后需要执行的方法(如事务、日志、权限),这些方法我们封装到一个类里面,这个类就叫切面。 连接点(joinpoint) spring里面的连接点指需要切入的方法,通常这个joinpoint可以作为一个参数传入到切面的方法里面(非常有用的一个东西)。 通知(Advice) 通知就是切面里面方法的具体实现,分为前置、后置、最终、异常环</div> </li> <li><a href="/article/2632.htm" title="初一上学期难记忆单词背诵第二课" target="_blank">初一上学期难记忆单词背诵第二课</a> <span class="text-muted">dcj3sjt126com</span> <a class="tag" taget="_blank" href="/search/english/1.htm">english</a><a class="tag" taget="_blank" href="/search/word/1.htm">word</a> <div>middle 中间的,中级的 well 喔,那么;好吧 phone 电话,电话机 policeman 警察 ask 问 take 拿到;带到 address 地址 glad 高兴的,乐意的 why 为什么  China 中国 family 家庭 grandmother (外)祖母 grandfather (外)祖父 wife 妻子 husband 丈夫 da</div> </li> <li><a href="/article/2759.htm" title="Linux日志分析常用命令" target="_blank">Linux日志分析常用命令</a> <span class="text-muted">dcj3sjt126com</span> <a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a><a class="tag" taget="_blank" href="/search/log/1.htm">log</a> <div>1.查看文件内容 cat -n 显示行号 2.分页显示 more Enter 显示下一行 空格 显示下一页 F 显示下一屏 B 显示上一屏 less /get 查询"get"字符串并高亮显示 3.显示文件尾 tail -f 不退出持续显示 -n 显示文件最后n行 4.显示头文件 head -n 显示文件开始n行 5.内容排序 sort -n 按照</div> </li> <li><a href="/article/2886.htm" title="JSONP 原理分析" target="_blank">JSONP 原理分析</a> <span class="text-muted">fantasy2005</span> <a class="tag" taget="_blank" href="/search/JavaScript/1.htm">JavaScript</a><a class="tag" taget="_blank" href="/search/jsonp/1.htm">jsonp</a><a class="tag" taget="_blank" href="/search/jsonp+%E8%B7%A8%E5%9F%9F/1.htm">jsonp 跨域</a> <div>转自 http://www.nowamagic.net/librarys/veda/detail/224 JavaScript是一种在Web开发中经常使用的前端动态脚本技术。在JavaScript中,有一个很重要的安全性限制,被称为“Same-Origin Policy”(同源策略)。这一策略对于JavaScript代码能够访问的页面内容做了很重要的限制,即JavaScript只能访问与包含它的</div> </li> <li><a href="/article/3013.htm" title="使用connect by进行级联查询" target="_blank">使用connect by进行级联查询</a> <span class="text-muted">234390216</span> <a class="tag" taget="_blank" href="/search/oracle/1.htm">oracle</a><a class="tag" taget="_blank" href="/search/%E6%9F%A5%E8%AF%A2/1.htm">查询</a><a class="tag" taget="_blank" href="/search/%E7%88%B6%E5%AD%90/1.htm">父子</a><a class="tag" taget="_blank" href="/search/Connect+by/1.htm">Connect by</a><a class="tag" taget="_blank" href="/search/%E7%BA%A7%E8%81%94/1.htm">级联</a> <div>使用connect by进行级联查询          connect by可以用于级联查询,常用于对具有树状结构的记录查询某一节点的所有子孙节点或所有祖辈节点。          来看一个示例,现假设我们拥有一个菜单表t_menu,其中只有三个字段:</div> </li> <li><a href="/article/3140.htm" title="一个不错的能将HTML表格导出为excel,pdf等的jquery插件" target="_blank">一个不错的能将HTML表格导出为excel,pdf等的jquery插件</a> <span class="text-muted">jackyrong</span> <a class="tag" taget="_blank" href="/search/jquery%E6%8F%92%E4%BB%B6/1.htm">jquery插件</a> <div>发现一个老外写的不错的jquery插件,可以实现将HTML 表格导出为excel,pdf等格式, 地址在: https://github.com/kayalshri/ 下面看个例子,实现导出表格到excel,pdf <html> <head> <title>Export html table to excel an</div> </li> <li><a href="/article/3267.htm" title="UI设计中我们为什么需要设计动效" target="_blank">UI设计中我们为什么需要设计动效</a> <span class="text-muted">lampcy</span> <a class="tag" taget="_blank" href="/search/UI/1.htm">UI</a><a class="tag" taget="_blank" href="/search/UI%E8%AE%BE%E8%AE%A1/1.htm">UI设计</a> <div>关于Unity3D中的Shader的知识 首先先解释下Unity3D的Shader,Unity里面的Shaders是使用一种叫ShaderLab的语言编写的,它同微软的FX文件或者NVIDIA的CgFX有些类似。传统意义上的vertex shader和pixel shader还是使用标准的Cg/HLSL 编程语言编写的。因此Unity文档里面的Shader,都是指用ShaderLab编写的代码,</div> </li> <li><a href="/article/3394.htm" title="如何禁止页面缓存" target="_blank">如何禁止页面缓存</a> <span class="text-muted">nannan408</span> <a class="tag" taget="_blank" href="/search/html/1.htm">html</a><a class="tag" taget="_blank" href="/search/jsp/1.htm">jsp</a><a class="tag" taget="_blank" href="/search/cache/1.htm">cache</a> <div>禁止页面使用缓存~ ------------------------------------------------ jsp:页面no cache: response.setHeader("Pragma","No-cache"); response.setHeader("Cache-Control","no-cach</div> </li> <li><a href="/article/3521.htm" title="以代码的方式管理quartz定时任务的暂停、重启、删除、添加等" target="_blank">以代码的方式管理quartz定时任务的暂停、重启、删除、添加等</a> <span class="text-muted">Everyday都不同</span> <a class="tag" taget="_blank" href="/search/%E5%AE%9A%E6%97%B6%E4%BB%BB%E5%8A%A1%E7%AE%A1%E7%90%86/1.htm">定时任务管理</a><a class="tag" taget="_blank" href="/search/spring-quartz/1.htm">spring-quartz</a> <div>      【前言】在项目的管理功能中,对定时任务的管理有时会很常见。因为我们不能指望只在配置文件中配置好定时任务就行了,因为如果要控制定时任务的 “暂停” 呢?暂停之后又要在某个时间点 “重启” 该定时任务呢?或者说直接 “删除” 该定时任务呢?要改变某定时任务的触发时间呢? “添加” 一个定时任务对于系统的使用者而言,是不太现实的,因为一个定时任务的处理逻辑他是不</div> </li> <li><a href="/article/3648.htm" title="EXT实例" target="_blank">EXT实例</a> <span class="text-muted">tntxia</span> <a class="tag" taget="_blank" href="/search/ext/1.htm">ext</a> <div>  (1) 增加一个按钮   JSP:   <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <% String path = request.getContextPath(); Stri</div> </li> <li><a href="/article/3775.htm" title="数学学习在计算机研究领域的作用和重要性" target="_blank">数学学习在计算机研究领域的作用和重要性</a> <span class="text-muted">xjnine</span> <a class="tag" taget="_blank" href="/search/Math/1.htm">Math</a> <div>最近一直有师弟师妹和朋友问我数学和研究的关系,研一要去学什么数学课。毕竟在清华,衡量一个研究生最重要的指标之一就是paper,而没有数学,是肯定上不了世界顶级的期刊和会议的,这在计算机学界尤其重要!你会发现,不论哪个领域有价值的东西,都一定离不开数学!在这样一个信息时代,当google已经让世界没有秘密的时候,一种卓越的数学思维,绝对可以成为你的核心竞争力.  无奈本人实在见地</div> </li> </ul> </div> </div> </div> <div> <div class="container"> <div class="indexes"> <strong>按字母分类:</strong> <a href="/tags/A/1.htm" target="_blank">A</a><a href="/tags/B/1.htm" target="_blank">B</a><a href="/tags/C/1.htm" target="_blank">C</a><a href="/tags/D/1.htm" target="_blank">D</a><a href="/tags/E/1.htm" target="_blank">E</a><a href="/tags/F/1.htm" target="_blank">F</a><a href="/tags/G/1.htm" target="_blank">G</a><a href="/tags/H/1.htm" target="_blank">H</a><a href="/tags/I/1.htm" target="_blank">I</a><a href="/tags/J/1.htm" target="_blank">J</a><a href="/tags/K/1.htm" target="_blank">K</a><a href="/tags/L/1.htm" target="_blank">L</a><a href="/tags/M/1.htm" target="_blank">M</a><a href="/tags/N/1.htm" target="_blank">N</a><a href="/tags/O/1.htm" target="_blank">O</a><a href="/tags/P/1.htm" target="_blank">P</a><a href="/tags/Q/1.htm" target="_blank">Q</a><a href="/tags/R/1.htm" target="_blank">R</a><a href="/tags/S/1.htm" target="_blank">S</a><a href="/tags/T/1.htm" target="_blank">T</a><a href="/tags/U/1.htm" target="_blank">U</a><a href="/tags/V/1.htm" target="_blank">V</a><a href="/tags/W/1.htm" target="_blank">W</a><a href="/tags/X/1.htm" target="_blank">X</a><a href="/tags/Y/1.htm" target="_blank">Y</a><a href="/tags/Z/1.htm" target="_blank">Z</a><a href="/tags/0/1.htm" target="_blank">其他</a> </div> </div> </div> <footer id="footer" class="mb30 mt30"> <div class="container"> <div class="footBglm"> <a target="_blank" href="/">首页</a> - <a target="_blank" href="/custom/about.htm">关于我们</a> - <a target="_blank" href="/search/Java/1.htm">站内搜索</a> - <a target="_blank" href="/sitemap.txt">Sitemap</a> - <a target="_blank" href="/custom/delete.htm">侵权投诉</a> </div> <div class="copyright">版权所有 IT知识库 CopyRight © 2000-2050 E-COM-NET.COM , All Rights Reserved. <!-- <a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">京ICP备09083238号</a><br>--> </div> </div> </footer> <!-- 代码高亮 --> <script type="text/javascript" src="/static/syntaxhighlighter/scripts/shCore.js"></script> <script type="text/javascript" src="/static/syntaxhighlighter/scripts/shLegacy.js"></script> <script type="text/javascript" src="/static/syntaxhighlighter/scripts/shAutoloader.js"></script> <link type="text/css" rel="stylesheet" href="/static/syntaxhighlighter/styles/shCoreDefault.css"/> <script type="text/javascript" src="/static/syntaxhighlighter/src/my_start_1.js"></script> </body> </html>